|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream htsjdk.samtools.util.BlockCompressedInputStream
public class BlockCompressedInputStream
Nested Class Summary | |
---|---|
static class |
BlockCompressedInputStream.FileTermination
|
Constructor Summary | |
---|---|
BlockCompressedInputStream(java.io.File file)
Use this ctor if you wish to call seek() |
|
BlockCompressedInputStream(java.io.InputStream stream)
Note that seek() is not supported if this ctor is used. |
|
BlockCompressedInputStream(java.io.InputStream stream,
boolean allowBuffering)
Note that seek() is not supported if this ctor is used. |
|
BlockCompressedInputStream(SeekableStream strm)
For providing some arbitrary data source. |
|
BlockCompressedInputStream(java.net.URL url)
|
Method Summary | |
---|---|
static void |
assertNonDefectiveFile(java.io.File file)
|
int |
available()
|
static BlockCompressedInputStream.FileTermination |
checkTermination(java.io.File file)
|
void |
close()
Closes the underlying InputStream or RandomAccessFile |
static long |
getFileBlock(long bgzfOffset)
|
long |
getFilePointer()
|
long |
getPosition()
The current offset, in bytes, of this stream/writer/file. |
static boolean |
isValidFile(java.io.InputStream stream)
|
int |
read()
Reads the next byte of data from the input stream. |
int |
read(byte[] buffer)
Reads some number of bytes from the input stream and stores them into the buffer array b. |
int |
read(byte[] buffer,
int offset,
int length)
Reads up to len bytes of data from the input stream into an array of bytes. |
java.lang.String |
readLine()
Reads a whole line. |
void |
seek(long pos)
Seek to the given position in the file. |
void |
setCheckCrcs(boolean check)
Determines whether or not the inflater will re-calculated the CRC on the decompressed data and check it against the value stored in the GZIP header. |
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockCompressedInputStream(java.io.InputStream stream)
public BlockCompressedInputStream(java.io.InputStream stream, boolean allowBuffering)
public BlockCompressedInputStream(java.io.File file) throws java.io.IOException
java.io.IOException
public BlockCompressedInputStream(java.net.URL url)
public BlockCompressedInputStream(SeekableStream strm)
Method Detail |
---|
public void setCheckCrcs(boolean check)
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer) throws java.io.IOException
read
in class java.io.InputStream
buffer
- the buffer into which the data is read.
java.io.IOException
public java.lang.String readLine() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
buffer
- buffer into which data is read.offset
- the start offset in array b at which the data is written.length
- the maximum number of bytes to read.
java.io.IOException
public void seek(long pos) throws java.io.IOException
pos
- virtual file pointer
java.io.IOException
public long getFilePointer()
public long getPosition()
LocationAware
getPosition
in interface LocationAware
public static long getFileBlock(long bgzfOffset)
public static boolean isValidFile(java.io.InputStream stream) throws java.io.IOException
stream
- Must be at start of file. Throws RuntimeException if !stream.markSupported().
java.io.IOException
public static BlockCompressedInputStream.FileTermination checkTermination(java.io.File file) throws java.io.IOException
java.io.IOException
public static void assertNonDefectiveFile(java.io.File file) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |