- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.BufferedInputStream
-
- org.refcodes.io.ZipFileInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ZipFileInputStream extends BufferedInputStream
Represents anInputStreamfrom a providedFile: In case the file points to a ZIP compressed file, then the uncompressed data of the therein contained file with the same name excluding the ".zip" extension is provided by theInputStream.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ZipFileInputStream(File aFile)Instantiates a new zip file input stream impl.ZipFileInputStream(File parent, String child)Instantiates a new zip file input stream impl.ZipFileInputStream(String pathname)Instantiates a new zip file input stream impl.ZipFileInputStream(String parent, String child)Instantiates a new zip file input stream impl.ZipFileInputStream(URI uri)Instantiates a new zip file input stream impl.
-
Method Summary
-
Methods inherited from class java.io.BufferedInputStream
available, close, mark, markSupported, read, read, reset, skip
-
Methods inherited from class java.io.FilterInputStream
read
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ZipFileInputStream
public ZipFileInputStream(File parent, String child) throws ZipException, FileNotFoundException, IOException
Instantiates a new zip file input stream impl.- Parameters:
parent- the parentchild- the child- Throws:
ZipException- the zip exceptionFileNotFoundException- the file not found exceptionIOException- Signals that an I/O exception has occurred.
-
ZipFileInputStream
public ZipFileInputStream(String parent, String child) throws ZipException, FileNotFoundException, IOException
Instantiates a new zip file input stream impl.- Parameters:
parent- the parentchild- the child- Throws:
ZipException- the zip exceptionFileNotFoundException- the file not found exceptionIOException- Signals that an I/O exception has occurred.
-
ZipFileInputStream
public ZipFileInputStream(String pathname) throws ZipException, FileNotFoundException, IOException
Instantiates a new zip file input stream impl.- Parameters:
pathname- the pathname- Throws:
ZipException- the zip exceptionFileNotFoundException- the file not found exceptionIOException- Signals that an I/O exception has occurred.
-
ZipFileInputStream
public ZipFileInputStream(URI uri) throws ZipException, FileNotFoundException, IOException
Instantiates a new zip file input stream impl.- Parameters:
uri- the uri- Throws:
ZipException- the zip exceptionFileNotFoundException- the file not found exceptionIOException- Signals that an I/O exception has occurred.
-
ZipFileInputStream
public ZipFileInputStream(File aFile) throws ZipException, FileNotFoundException, IOException
Instantiates a new zip file input stream impl.- Parameters:
aFile- the file- Throws:
ZipException- the zip exceptionFileNotFoundException- the file not found exceptionIOException- Signals that an I/O exception has occurred.
-
-