Package loci.common
Class GZipHandle
java.lang.Object
loci.common.StreamHandle
loci.common.GZipHandle
- All Implemented Interfaces:
DataInput,DataOutput,IRandomAccess
StreamHandle implementation for reading from gzip-compressed files
or byte arrays. Instances of GZipHandle are read-only.
- Author:
- Melissa Linkert melissa at glencoesoftware.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class loci.common.StreamHandle
StreamHandle.Settings -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisGZipFile(String file) protected voidClose and reopen the stream; the stream pointer and mark should be reset to 0.Methods inherited from class loci.common.StreamHandle
close, 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
-
Constructor Details
-
GZipHandle
Construct a new GZipHandle for the given file.- Parameters:
file- the path to the GZip file- Throws:
HandleException- if the given file name is not a GZip file.IOException
-
-
Method Details
-
isGZipFile
- Parameters:
file- the path to the GZip file- Returns:
- true if the given filename is a gzip file
- Throws:
IOException- if the file cannot be read
-
resetStream
Description copied from class:StreamHandleClose and reopen the stream; the stream pointer and mark should be reset to 0. This method is called if we need to seek backwards within the stream.- Specified by:
resetStreamin classStreamHandle- Throws:
IOException- if the stream cannot be reset
-