The details of the sub-protocol can be queried using getSubProtocol().
See example in AssetURLConnection.
| Modifier and Type | Field and Description |
|---|---|
| protected I | |
| protected URLConnection | |
| protected URL |
| Access | Constructor and Description |
|---|---|
| protected | PiggybackURLConnection(final URL
the specific URL for this instance url, final I the piggyback context, defining state independent code and constants context)
|
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | connect()
Implements abstract java.
Resolves the URL via |
| public abstract String | |
| public InputStream | getInputStream()
Overrides java. |
| public URL | getSubProtocol()
Returns the resolved sub protocol of the asset or null, ie: Plain asset:test/lala.txt Resolved asset:jar:file:/data/app/jogamp.test.apk!/assets/test/lala.txt Result jar:file:/data/app/jogamp.test.apk!/assets/test/lala.txt |
| context | back to summary |
|---|---|
| protected I context | |
| subConn | back to summary |
|---|---|
| protected URLConnection subConn | |
| subUrl | back to summary |
|---|---|
| protected URL subUrl | |
| PiggybackURLConnection | back to summary |
|---|---|
protected PiggybackURLConnection(final URL url, final I context)
| |
| connect | back to summary |
|---|---|
| public synchronized void connect() throws IOException Implements abstract java. Doc from java.
Resolves the URL via
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.
| |
| getEntryName | back to summary |
|---|---|
| public abstract String getEntryName() throws IOException Returns the entry name of the asset. Plain asset:test/lala.txt Resolved asset:jar:file:/data/app/jogamp.test.apk!/assets/test/lala.txt Result test/lala.txt
| |
| 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.
| |
| getSubProtocol | back to summary |
|---|---|
| public URL getSubProtocol() throws IOException Returns the resolved sub protocol of the asset or null, ie: Plain asset:test/lala.txt Resolved asset:jar:file:/data/app/jogamp.test.apk!/assets/test/lala.txt Result jar:file:/data/app/jogamp.test.apk!/assets/test/lala.txt
| |