public class ZipHandle extends StreamHandle
StreamHandle| Modifier and Type | Field and Description |
|---|---|
private int |
entryCount |
private String |
entryName |
private RandomAccessInputStream |
in |
private ZipInputStream |
zip |
| Constructor and Description |
|---|
ZipHandle(String file) |
ZipHandle(String file,
ZipEntry entry)
Constructs a new ZipHandle corresponding to the given entry of the
specified Zip file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this random access stream and releases
any system resources associated with the stream.
|
int |
getEntryCount()
Returns the number of entries.
|
String |
getEntryName()
Get the name of the backing Zip entry.
|
private static IRandomAccess |
getHandle(String file) |
DataInputStream |
getInputStream()
Returns the DataInputStream corresponding to the backing Zip entry.
|
static boolean |
isZipFile(String file)
Returns true if the given filename is a Zip file.
|
private static RandomAccessInputStream |
openStream(String file) |
private void |
populateLength() |
protected void |
resetStream()
Close and reopen the stream; the stream pointer and mark should be
reset to 0.
|
private void |
seekToEntry() |
getFilePointer, getOrder, length, read, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setOrder, skipBytes, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFprivate RandomAccessInputStream in
private ZipInputStream zip
private String entryName
private int entryCount
public ZipHandle(String file) throws IOException
IOExceptionpublic ZipHandle(String file, ZipEntry entry) throws IOException
HandleException - if the given file is not a Zip file.IOExceptionpublic static boolean isZipFile(String file) throws IOException
IOExceptionpublic String getEntryName()
public DataInputStream getInputStream()
public int getEntryCount()
public void close()
throws IOException
IRandomAccessclose in interface IRandomAccessclose in class StreamHandleIOExceptionprotected void resetStream()
throws IOException
StreamHandleresetStream in class StreamHandleIOExceptionprivate void seekToEntry()
throws IOException
IOExceptionprivate void populateLength()
throws IOException
IOExceptionprivate static IRandomAccess getHandle(String file) throws IOException
IOExceptionprivate static RandomAccessInputStream openStream(String file) throws IOException
IOExceptionCopyright © 2016 Open Microscopy Environment