Hello
At this time, I write a sofware in Java.
My code can read a file by URL, but I want detect the followed cases:
1- I want test if the web server is ready or not
2- I want test if the DNS resolution is done
3- I want test if URL is a bad link (Ex Error 404: File not found)
Can you help me.
Thanks in advance.
Dominique Chaniat
NB: If you want, you can give me a respons in french.
The partial code is:
public void FileByUrl(String urlName) {
URL urlInput ;
InputStreamReader streamReader;
this.bufferReader = null;
try {
urlInput = new URL(urlName);
streamReader = new InputStreamReader(urlInput.openStream());
this.bufferReader = new BufferedReader (streamReader) ;
}
catch (Exception e) {
}
} // End of FileByUrl method
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html