Package org.apache.jena.atlas.io
Class PeekInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.jena.atlas.io.PeekInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public final class PeekInputStream extends java.io.InputStreamParsing-centric input stream.- See Also:
PeekReader
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleaneof()longgetColNum()InputStreamBufferedgetInput()longgetLineNum()longgetPosition()static PeekInputStreammake(java.io.InputStream inputStream)static PeekInputStreammake(java.io.InputStream inputStream, int bufferSize)static PeekInputStreamopen(java.lang.String filename)intpeekByte()voidpushbackByte(int b)push back a byte : does not alter underlying position, line or column countsintread()intread(byte[] buf, int off, int len)intreadByte()
-
-
-
Field Detail
-
INIT_LINE
public static final int INIT_LINE
- See Also:
- Constant Field Values
-
INIT_COL
public static final int INIT_COL
- See Also:
- Constant Field Values
-
-
Method Detail
-
make
public static PeekInputStream make(java.io.InputStream inputStream)
-
make
public static PeekInputStream make(java.io.InputStream inputStream, int bufferSize)
-
open
public static PeekInputStream open(java.lang.String filename)
-
getInput
public final InputStreamBuffered getInput()
-
getLineNum
public long getLineNum()
-
getColNum
public long getColNum()
-
getPosition
public long getPosition()
-
peekByte
public final int peekByte()
-
readByte
public final int readByte()
-
pushbackByte
public final void pushbackByte(int b)
push back a byte : does not alter underlying position, line or column counts
-
close
public final void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
read
public final int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public final int read(byte[] buf, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
eof
public final boolean eof()
-
-