| Modifier and Type | Field and Description |
|---|---|
| private final Resource |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | connect()
Implements abstract java. Opens a communications link to the resource referenced by this URL, if such a connection has not already been established. |
| public Object | getContent(final Class<?>...
the classes)Class array
indicating the requested typesOverrides java. Retrieves the contents of this URL connection. |
| public Object | getContent()
Overrides java. Retrieves the contents of this URL connection. |
| public long | getContentLengthLong()
Overrides java. Returns the value of the |
| public String | getContentType()
Overrides java. Returns the value of the |
| public InputStream | getInputStream()
Overrides java. Returns an input stream that reads from this open connection. |
| public long | getLastModified()
Overrides java. Returns the value of the |
| public Resource | Returns: the resource associated with this connection (notnull)Returns the resource associated with this connection (not |
| resource | back to summary |
|---|---|
| private final Resource resource | |
| ResourceURLConnection | back to summary |
|---|---|
| pack-priv ResourceURLConnection(final URL url, final Resource resource) | |
| connect | back to summary |
|---|---|
| public void connect() Implements abstract java. Doc from java. Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.
If the URLConnection objects go through two phases: first they are created, then they are connected. After being created, and before being connected, various options can be specified (e.g., doInput and UseCaches). After connecting, it is an error to try to set them. Operations that depend on being connected, like getContentLength, will implicitly perform the connection, if necessary. | |
| getContent | back to summary |
|---|---|
| public Object getContent(final Class<?>... classes) throws IOException Overrides java. Doc from java. Retrieves the contents of this URL connection.
| |
| getContent | back to summary |
|---|---|
| public Object getContent() throws IOException Overrides java. Doc from java. Retrieves the contents of this URL connection.
This method first determines the content type of the object by
calling the This is done as follows:
| |
| getContentLengthLong | back to summary |
|---|---|
| public long getContentLengthLong() Overrides java. Doc from java. Returns the value of the
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Overrides java. Doc from java. Returns the value of the
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Overrides java. Doc from java. Returns an input stream that reads from this open connection. A SocketTimeoutException can be thrown when reading from the returned input stream if the read timeout expires before data is available for read.
| |
| getLastModified | back to summary |
|---|---|
| public long getLastModified() Overrides java. Doc from java. Returns the value of the
| |
| resource | back to summary |
|---|---|
| public Resource resource() Returns the resource associated with this connection (not
| |