com.photoviewer.client.net
Class HttpConnection

java.lang.Object
  |
  +--com.photoviewer.client.net.HttpConnection

public class HttpConnection
extends java.lang.Object

This class provides an API to fetch files from URLs.

Author:
John De Regnaucourt

Constructor Summary
HttpConnection()
           
 
Method Summary
 byte[] getContentFromURL(java.lang.String stringURL)
          Retreive a document from the passed in URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConnection

public HttpConnection()
Method Detail

getContentFromURL

public byte[] getContentFromURL(java.lang.String stringURL)
Retreive a document from the passed in URL. The URL specifies an HTTP server.

Parameters:
stringURL - URL of content to fetch parameter can be null, in which case no progress is given.
Returns:
byte[] of the content received from the passed in URL. null is return in case of an error.