Package aQute.lib.io
Class LineSeparatorBufferedReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- aQute.lib.io.LineSeparatorBufferedReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class LineSeparatorBufferedReader extends java.io.BufferedReaderBufferedReader which returns the line separator string for the previously read line.
-
-
Constructor Summary
Constructors Constructor Description LineSeparatorBufferedReader(java.io.Reader in)LineSeparatorBufferedReader(java.io.Reader in, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringlineSeparator()Return the line separator string from the previously read line usingreadLine()or the empty string if end of file.voidmark(int readAheadLimit)intread()intread(char[] cbuf)intread(char[] cbuf, int off, int len)intread(java.nio.CharBuffer target)java.lang.StringreadLine()booleanready()voidreset()longskip(long n)
-
-
-
Method Detail
-
mark
public void mark(int readAheadLimit) throws java.io.IOException- Overrides:
markin classjava.io.BufferedReader- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.BufferedReader- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.BufferedReader- Throws:
java.io.IOException
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.BufferedReader- Throws:
java.io.IOException
-
read
public int read(java.nio.CharBuffer target) throws java.io.IOException- Specified by:
readin interfacejava.lang.Readable- Overrides:
readin classjava.io.Reader- Throws:
java.io.IOException
-
read
public int read(char[] cbuf) throws java.io.IOException- Overrides:
readin classjava.io.Reader- Throws:
java.io.IOException
-
readLine
public java.lang.String readLine() throws java.io.IOException- Overrides:
readLinein classjava.io.BufferedReader- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.BufferedReader- Throws:
java.io.IOException
-
ready
public boolean ready() throws java.io.IOException- Overrides:
readyin classjava.io.BufferedReader- Throws:
java.io.IOException
-
lineSeparator
public java.lang.String lineSeparator() throws java.io.IOExceptionReturn the line separator string from the previously read line usingreadLine()or the empty string if end of file. This method can be called once per read line. Subsequent calls per read line will return the empty string.- Returns:
- The line separator string from the previously read line.
- Throws:
java.io.IOException- If an exception occurs reading.
-
-