| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final InputStream | |
| private final String | |
| private static final Charset |
| 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 String | getContentEncoding()
Overrides java. Returns the value of the |
| public int | getContentLength()
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. |
| private static String |
| data | back to summary |
|---|---|
| private final byte[] data | |
| inputStream | back to summary |
|---|---|
| private final InputStream inputStream | |
| mediaType | back to summary |
|---|---|
| private final String mediaType | |
| US_ASCII | back to summary |
|---|---|
| private static final Charset US_ASCII | |
| DataURLConnection | back to summary |
|---|---|
| pack-priv DataURLConnection(URL url) throws IOException | |
| 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.
| |
| getContentEncoding | back to summary |
|---|---|
| public String getContentEncoding() Overrides java. Doc from java. Returns the value of the | |
| getContentLength | back to summary |
|---|---|
| public int getContentLength() Overrides java. Doc from java. Returns the value of the Note
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Overrides java. Doc from java. Returns the value of the | |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() 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.
| |
| urlDecode | back to summary |
|---|---|
| private static String urlDecode(String str, Charset charset) | |