public class ZipHandle extends StreamHandle
StreamHandle
StreamHandle.Settings
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() |
String |
getEntryName() |
DataInputStream |
getInputStream() |
static boolean |
isZipFile(String file) |
protected void |
resetStream()
Close and reopen the stream; the stream pointer and mark should be
reset to 0.
|
exists, getFilePointer, getOrder, length, read, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setOrder, skipBytes, skipBytes, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
public ZipHandle(String file) throws IOException
IOException
public ZipHandle(String file, ZipEntry entry) throws IOException
file
- a name that can be passed to
Location.getHandle(String, boolean, boolean)
entry
- the specific entry in the Zip file to be openedHandleException
- if the given file is not a Zip file.IOException
ZipEntry
public static boolean isZipFile(String file) throws IOException
file
- a name that can be passed to
Location.getHandle(String, boolean, boolean)
IOException
- if the file cannot be readpublic String getEntryName()
public DataInputStream getInputStream()
public int getEntryCount()
public void close() throws IOException
IRandomAccess
close
in interface IRandomAccess
close
in class StreamHandle
IOException
- if the underlying stream(s) could not be closedprotected void resetStream() throws IOException
StreamHandle
resetStream
in class StreamHandle
IOException
- if the stream cannot be resetCopyright © 2005–2023 Open Microscopy Environment. All rights reserved.