GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext > Class Template Referenceabstract

Generic resource location protocol connection, using another sub-protocol as the vehicle for a piggyback protocol. More...

Inheritance diagram for com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >:
Collaboration diagram for com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >:

Public Member Functions

synchronized void connect () throws IOException
 
InputStream getInputStream () throws IOException
 
abstract String getEntryName () throws IOException
 Returns the entry name of the asset. More...
 
URL getSubProtocol () throws IOException
 Returns the resolved sub protocol of the asset or null, ie: More...
 

Protected Member Functions

 PiggybackURLConnection (final URL url, final I context)
 

Protected Attributes

URL subUrl
 
URLConnection subConn
 
context
 

Detailed Description

Generic resource location protocol connection, using another sub-protocol as the vehicle for a piggyback protocol.

The details of the sub-protocol can be queried using getSubProtocol().

See example in AssetURLConnection.

Definition at line 18 of file PiggybackURLConnection.java.

Constructor & Destructor Documentation

◆ PiggybackURLConnection()

com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >.PiggybackURLConnection ( final URL  url,
final I  context 
)
protected
Parameters
urlthe specific URL for this instance
contextthe piggyback context, defining state independent code and constants

Definition at line 27 of file PiggybackURLConnection.java.

Member Function Documentation

◆ connect()

synchronized void com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >.connect ( ) throws IOException

Resolves the URL via PiggybackURLContext#resolve(String), see AssetURLContext#resolve(String) for an example.

Definition at line 41 of file PiggybackURLConnection.java.

Here is the caller graph for this function:

◆ getEntryName()

abstract String com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >.getEntryName ( ) throws IOException
abstract

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
Exceptions
IOExceptionis not connected

◆ getInputStream()

InputStream com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >.getInputStream ( ) throws IOException

Definition at line 50 of file PiggybackURLConnection.java.

◆ getSubProtocol()

URL com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >.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
Exceptions
IOExceptionis not connected

Definition at line 78 of file PiggybackURLConnection.java.

Member Data Documentation

◆ context

Definition at line 21 of file PiggybackURLConnection.java.

◆ subConn

URLConnection com.jogamp.common.net.PiggybackURLConnection< I extends PiggybackURLContext >.subConn
protected

Definition at line 20 of file PiggybackURLConnection.java.

◆ subUrl

Definition at line 19 of file PiggybackURLConnection.java.


The documentation for this class was generated from the following file: