| Core Java |
 |
| Views 10 |
|
|
|
|
Reading Website Content
|
|
The following error occurs while reading a website content through java code.
java.net.UnknownHostException: <website name>
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at websiteReader.URLUtils.dump(URLUtils.java:89)
at websiteReader.URLUtils.main(URLUtils.java:9)
|
|
|
| Core Java |
 |
| Views 14 |
|
|
|
|
|
| Core Java |
 |
| Views 23 |
|
|
|
|
|
| Core Java |
 |
| Views 30 |
|
|
|
|
ZIP files in a folder using Java Program
|
|
This Java sample program demonstrates two things. 1. Zip files. 2. To list all the files in a folder
Most often, there is a need to zip files programmatically. In my case i had to automate the process of zipping and emailing the zipped file to the administrator at the end of every day
|
|
|
| Core Java |
 |
| Views 20 |
|
|
|
|
|
| Core Java |
 |
| Views 23 |
|
|
|
|
Extracting jpg images from an " old style JPEG-in-TIFF" type image
|
|
TIFF(Tagged Image File Format) is an image decoding format where multiple related jpeg images are tagged under a same file and saved in a single file in a decoded format.
Java provides a way of decoding these images and extract the decoded jpg files using it's Java Advanced Imaging (JAI) package, however before the decoding format for TIFF was standardized the image packaging was done simply by binary files using some tagging code between them.
Java declared that it is not interested in providing a solution for decoding the old-style nonstandard TIFF file.
I recently came across a situation where the client had TIFF images in the" old style JPEG-in-TIFF" format. Hence I had to discover a solution to decode them.
|
|
|
| Core Java |
 |
| Views 46 |
|
|
|
|
|
| Core Java |
 |
| Views 24 |
|
|
|
|
|
| Core Java |
 |
| Views 30 |
|
|
|
|
|
| Core Java |
 |
| Views 28 |
|
|
|
|
|