org.openjena.atlas.io
Class PeekInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.openjena.atlas.io.PeekInputStream
All Implemented Interfaces:
Closeable

public final class PeekInputStream
extends InputStream

Parsing-centric input stream.

See Also:
PeekReader

Field Summary
static int INIT_COL
           
static int INIT_LINE
           
 
Method Summary
 void close()
           
 boolean eof()
           
 long getColNum()
           
 InputStreamBuffered getInput()
           
 long getLineNum()
           
 long getPosition()
           
static PeekInputStream make(InputStream inputStream)
           
static PeekInputStream make(InputStream inputStream, int bufferSize)
           
static PeekInputStream open(String filename)
           
 int peekByte()
           
 void pushbackByte(int b)
          push back a byte : does not alter underlying position, line or column counts
 int read()
           
 int read(byte[] buf, int off, int len)
           
 int readByte()
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(InputStream inputStream)

make

public static PeekInputStream make(InputStream inputStream,
                                   int bufferSize)

open

public static PeekInputStream open(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 IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

read

public final int read()
               throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public final int read(byte[] buf,
                      int off,
                      int len)
               throws IOException
Overrides:
read in class InputStream
Throws:
IOException

eof

public final boolean eof()


Licenced under the Apache License, Version 2.0