com.threerings.resource
Class Handler
java.lang.Object
java.net.URLStreamHandler
com.threerings.resource.Handler
public class Handler
- extends URLStreamHandler
This class is not used directly, except by a registering ResourceManager so that we can load
data from the resource manager using URLs of the form
resource://<resourceSet>/<path>. ResourceSet may be the empty string
to load from the default resource sets.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_rmgr
protected static ResourceManager _rmgr
- Our singleton resource manager.
Handler
public Handler()
registerHandler
public static void registerHandler(ResourceManager rmgr)
- Register this class to handle "resource" urls ("resource://resourceSet/path")
with the specified ResourceManager.
hashCode
protected int hashCode(URL url)
- Overrides:
hashCode in class URLStreamHandler
equals
protected boolean equals(URL u1,
URL u2)
- Overrides:
equals in class URLStreamHandler
openConnection
protected URLConnection openConnection(URL url)
throws IOException
- Specified by:
openConnection in class URLStreamHandler
- Throws:
IOException
getStream
protected InputStream getStream(String bundle,
String path,
String query)
throws IOException
- Does some magic to allow a subset of an image to be extracted, reencoded as a PNG and then
spat back out to the Java content handler system for inclusion in internal documentation.
- Throws:
IOException