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 void
close()
Close down the reader and release all resources.int
read()
String
toString()
-
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 IOException
Close down the reader and release all resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- when closing the reader fails
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
-