Package org.snpeff.fileIterator
Class SeekableBufferedReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
org.snpeff.fileIterator.SeekableBufferedReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
A buffered reader for a file.
It allows to 'seek' and 'readLine()'
- Author:
- pablocingolani
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSeekableBufferedReader
(String fileName) SeekableBufferedReader
(String fileName, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
long
int
hashCode()
void
mark
(int readAheadLimit) boolean
void
int
read()
int
read
(char[] buff) int
read
(char[] cbuf, int off, int len) int
read
(CharBuffer arg0) readLine()
boolean
ready()
void
reset()
void
seek
(long pos) Seek to a position in the filelong
skip
(long n) toString()
Methods inherited from class java.io.BufferedReader
lines
Methods inherited from class java.io.Reader
nullReader, transferTo
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static int DEFAULT_BUFFER_SIZE
-
-
Constructor Details
-
SeekableBufferedReader
- Throws:
IOException
-
SeekableBufferedReader
- Throws:
IOException
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classBufferedReader
- Throws:
IOException
-
equals
-
getFilePointer
public long getFilePointer() -
hashCode
public int hashCode() -
mark
- Overrides:
mark
in classBufferedReader
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classBufferedReader
-
open
- Throws:
IOException
-
read
- Overrides:
read
in classBufferedReader
- Throws:
IOException
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Overrides:
read
in classBufferedReader
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadable
- Overrides:
read
in classReader
- Throws:
IOException
-
readLine
- Overrides:
readLine
in classBufferedReader
- Throws:
IOException
-
ready
- Overrides:
ready
in classBufferedReader
- Throws:
IOException
-
reset
- Overrides:
reset
in classBufferedReader
- Throws:
IOException
-
seek
Seek to a position in the file- Throws:
IOException
-
skip
- Overrides:
skip
in classBufferedReader
- Throws:
IOException
-
toString
-