de.unkrig.commons.file.org.apache.commons.compress.compressors
Class CompressionURLStreamHandler

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

public abstract class CompressionURLStreamHandler
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
CompressionURLStreamHandler()
           
 
Method Summary
protected abstract  java.io.InputStream open(java.io.InputStream containerInputStream)
          Opens the given container 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

CompressionURLStreamHandler

public CompressionURLStreamHandler()
Method Detail

open

protected abstract java.io.InputStream open(java.io.InputStream containerInputStream)
                                     throws java.io.IOException
Opens the given container and returns an InputStream that reads from it.

Throws:
java.io.IOException

openConnection

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