|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.url.URLData
Constructor Summary | |
URLData(String url)
Create a new URLData object with the given URL |
|
URLData(String url,
Map headers,
byte[] content)
Create a new URLData the given URL, headers, and content |
Method Summary | |
byte[] |
getContent()
This is a byte array representation of the content returned by the connection. |
String |
getContentAsString()
Deprecated. use getContent() and then use the appropriate charset to do the converstion. This also only works when the content is text and there are no guarantees when the returned content is actually binary. |
String |
getContentType()
this returns the content type after the headers have been set. |
Exception |
getException()
this returns any exception that was raised while downloading or reading the URL. |
Map |
getHeaders()
This returns any headers that were returned when the connection was opened to the URL |
String |
getURL()
This returns the actual URL that is represented by the data |
void |
setContent(byte[] content)
|
void |
setException(Exception e)
This is the exception that was raised while trying to connect to the URL or read data from the url |
void |
setHeaders(Map headers)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLData(String url)
public URLData(String url, Map headers, byte[] content)
Method Detail |
public String getURL()
public Map getHeaders()
public void setHeaders(Map headers)
public byte[] getContent()
public void setContent(byte[] content)
public String getContentAsString()
public void setException(Exception e)
public Exception getException()
public String getContentType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |