java.lang.Object
java.io.Reader
org.apache.jena.atlas.io.PeekReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
Parsing-centric reader. This class is not thread safe.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()final booleaneof()longlonglongstatic PeekReaderstatic PeekReaderstatic PeekReadermake(CharStream r) static PeekReadermakeASCII(InputStream in) Make PeekReader where the input is ASCIIstatic PeekReadermakeUTF8(InputStream in) Make PeekReader where the input is UTF8 : BOM is removedstatic PeekReaderfinal intpeekChar()final voidpushbackChar(int ch) push back a character : does not alter underlying position, line or column countsfinal intread()final intread(char[] cbuf, int off, int len) final intreadChar()Next character or EOF.static PeekReaderreadString(String string) Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
-
Field Details
-
INIT_LINE
public static final int INIT_LINE- See Also:
-
INIT_COL
public static final int INIT_COL- See Also:
-
-
Method Details
-
make
-
make
-
makeUTF8
Make PeekReader where the input is UTF8 : BOM is removed -
makeASCII
Make PeekReader where the input is ASCII -
make
-
readString
-
open
-
getLineNum
public long getLineNum() -
getColNum
public long getColNum() -
getPosition
public long getPosition() -
peekChar
public final int peekChar() -
readChar
public final int readChar()Next character or EOF. Sets peekChar. -
pushbackChar
public final void pushbackChar(int ch) push back a character : does not alter underlying position, line or column counts -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
eof
public final boolean eof()
-