Top Description Fields Constructors Methods
com.jogamp.common.net

public Class AssetURLStreamHandler

extends URLStreamHandler
Class Inheritance
Imports
java.io.IOException, java.net.URL, .URLConnection, .URLStreamHandler, com.jogamp.common.net.AssetURLConnection

URLStreamHandler to handle the asset protocol.

This is the asset URLStreamHandler variation for manual use.

It requires passing a valid AssetURLContext for construction, hence it's not suitable for the pkg factory model.

Field Summary

Modifier and TypeField and Description
pack-priv AssetURLContext

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected URLConnection
openConnection(final URL
the URL that this connects to.
u
)

Implements abstract java.net.URLStreamHandler.openConnection.

Opens a connection to the object referenced by the URL argument.
Inherited from java.net.URLStreamHandler:
equalsgetDefaultPortgetHostAddresshashCodehostsEqualopenConnectionparseURLsameFilesetURLsetURLtoExternalForm

Field Detail

ctxback to summary
pack-priv AssetURLContext ctx

Constructor Detail

AssetURLStreamHandlerback to summary
public AssetURLStreamHandler(final AssetURLContext ctx)

Method Detail

openConnectionback to summary
protected URLConnection openConnection(final URL u) throws IOException

Implements abstract java.net.URLStreamHandler.openConnection.

Doc from java.net.URLStreamHandler.openConnection.

Opens a connection to the object referenced by the URL argument. This method should be overridden by a subclass.

If for the handler's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned, and for JAR a JarURLConnection will be returned.

Parameters
u:URL

the URL that this connects to.

Returns:URLConnection

a URLConnection object for the URL.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs while opening the connection.