de.unkrig.commons.file.org.apache.commons.compress.archivers
Class ArchiveURLStreamHandler

java.lang.Object
  extended by java.net.URLStreamHandler
      extended by de.unkrig.commons.file.org.apache.commons.compress.archivers.ArchiveURLStreamHandler
Direct Known Subclasses:
Handler, Handler, Handler, Handler, Handler, Handler, Handler

public abstract class ArchiveURLStreamHandler
extends java.net.URLStreamHandler

An abstract URLStreamHandler which makes the implementation of archive-based URLStreamHandlers simple.

The path component is interpreted as follows:

container-url!entry-name


Constructor Summary
ArchiveURLStreamHandler()
           
 
Method Summary
protected abstract  org.apache.commons.compress.archivers.ArchiveInputStream open(java.io.InputStream containerInputStream)
          Opens the given container, finds the entry with the given entryName and returns an InputStream that reads from it.
protected  java.net.URLConnection openConnection(java.net.URL url)
           
 
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchiveURLStreamHandler

public ArchiveURLStreamHandler()
Method Detail

open

protected abstract org.apache.commons.compress.archivers.ArchiveInputStream open(java.io.InputStream containerInputStream)
                                                                          throws org.apache.commons.compress.archivers.ArchiveException
Opens the given container, finds the entry with the given entryName and returns an InputStream that reads from it.

Throws:
org.apache.commons.compress.archivers.ArchiveException

openConnection

protected java.net.URLConnection openConnection(@Nullable
                                                java.net.URL url)
Specified by:
openConnection in class java.net.URLStreamHandler