Class TracedBufferedReader
- java.lang.Object
-
- java.io.Reader
-
- org.apache.iotdb.db.engine.modification.utils.TracedBufferedReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class TracedBufferedReader extends java.io.ReaderCopied fromBufferedReader, trace the read position by modifying the fill() method.
-
-
Constructor Summary
Constructors Constructor Description TracedBufferedReader(java.io.Reader in)Creates a buffering character-input stream that uses a default-sized input buffer.TracedBufferedReader(java.io.Reader in, int sz)Creates a buffering character-input stream that uses an input buffer of the specified size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()BufferedReader.close()java.util.stream.Stream<java.lang.String>lines()BufferedReader.lines()voidmark(int readAheadLimit)BufferedReader.mark(int)booleanmarkSupported()BufferedReader.markSupported()longposition()Returns this reader's file position.intread()BufferedReader.read()intread(char[] cbuf, int off, int len)BufferedReader.read(char[], int, int)java.lang.StringreadLine()BufferedReader.readLine()booleanready()BufferedReader.ready()voidreset()BufferedReader.reset()longskip(long n)BufferedReader.skip(long)
-
-
-
Constructor Detail
-
TracedBufferedReader
public TracedBufferedReader(java.io.Reader in, int sz)Creates a buffering character-input stream that uses an input buffer of the specified size.- Parameters:
in- A Readersz- Input-buffer size- Throws:
java.lang.IllegalArgumentException- Ifsz <= 0
-
TracedBufferedReader
public TracedBufferedReader(java.io.Reader in)
Creates a buffering character-input stream that uses a default-sized input buffer.- Parameters:
in- A Reader
-
-
Method Detail
-
read
public int read() throws java.io.IOExceptionBufferedReader.read()- Overrides:
readin classjava.io.Reader- Throws:
java.io.IOException
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOExceptionBufferedReader.read(char[], int, int)- Specified by:
readin classjava.io.Reader- Throws:
java.io.IOException
-
readLine
public java.lang.String readLine() throws java.io.IOExceptionBufferedReader.readLine()- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOExceptionBufferedReader.skip(long)- Overrides:
skipin classjava.io.Reader- Throws:
java.io.IOException
-
ready
public boolean ready() throws java.io.IOExceptionBufferedReader.ready()- Overrides:
readyin classjava.io.Reader- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
BufferedReader.markSupported()- Overrides:
markSupportedin classjava.io.Reader
-
mark
public void mark(int readAheadLimit) throws java.io.IOExceptionBufferedReader.mark(int)- Overrides:
markin classjava.io.Reader- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOExceptionBufferedReader.reset()- Overrides:
resetin classjava.io.Reader- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionBufferedReader.close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Reader- Throws:
java.io.IOException
-
lines
public java.util.stream.Stream<java.lang.String> lines()
BufferedReader.lines()
-
position
public long position()
Returns this reader's file position.- Returns:
- This reader's file position, a non-negative integer counting the number of bytes from the beginning of the file to the current position
-
-