Class Reader.ZipInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.opentrafficsim.base.compressedfiles.Reader.ZipInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- Reader
static class Reader.ZipInputStream extends InputStream implements Closeable
Container for a ZipFile that implements Readable and closes the contained ZipFile on close.
-
-
Constructor Summary
Constructors Constructor Description ZipInputStream(ZipFile zipFile, InputStream inputStream)Construct a new ZipInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close down the reader and release all resources.intread()StringtoString()-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
ZipInputStream
ZipInputStream(ZipFile zipFile, InputStream inputStream)
Construct a new ZipInputStream.- Parameters:
zipFile- ZipFile; the opened ZIP fileinputStream- InputStream; input stream of (the first) entry in the ZIP file
-
-
Method Detail
-
close
public void close() throws IOExceptionClose down the reader and release all resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- when closing the reader fails
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
-