Package org.broad.tribble.util
Class SeekableFileStream
- java.lang.Object
-
- java.io.InputStream
-
- org.broad.tribble.util.SeekableStream
-
- org.broad.tribble.util.SeekableFileStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class SeekableFileStream extends SeekableStream
- Author:
- jrobinso
-
-
Constructor Summary
Constructors Constructor Description SeekableFileStream(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
boolean
eof()
long
length()
void
mark(int readlimit)
boolean
markSupported()
long
position()
int
read()
int
read(byte[] b)
int
read(byte[] buffer, int offset, int length)
void
reset()
void
seek(long position)
long
skip(long n)
-
Methods inherited from class org.broad.tribble.util.SeekableStream
readFully
-
-
-
-
Method Detail
-
eof
public boolean eof() throws java.io.IOException
- Specified by:
eof
in classSeekableStream
- Throws:
java.io.IOException
-
length
public long length()
- Specified by:
length
in classSeekableStream
-
seek
public void seek(long position) throws java.io.IOException
- Specified by:
seek
in classSeekableStream
- Throws:
java.io.IOException
-
position
public long position() throws java.io.IOException
- Specified by:
position
in classSeekableStream
- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
mark
public void mark(int readlimit)
- Overrides:
mark
in classjava.io.InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
reset
public void reset() throws java.io.IOException
- Overrides:
reset
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-