org.openjena.atlas.io
Class PeekReader

java.lang.Object
  extended by java.io.Reader
      extended by org.openjena.atlas.io.PeekReader
All Implemented Interfaces:
Closeable, Readable

public final class PeekReader
extends Reader

Parsing-centric reader. This class is not thread safe.

See Also:
BufferingWriter, PeekInputStream

Field Summary
static int INIT_COL
           
static int INIT_LINE
           
 
Method Summary
 void close()
           
 boolean eof()
           
 long getColNum()
           
 long getLineNum()
           
 long getPosition()
           
static PeekReader make(CharStream r)
           
static PeekReader make(Reader r)
           
static PeekReader make(Reader r, int bufferSize)
           
static PeekReader makeASCII(InputStream in)
          Make PeekReader where the input is ASCII
static PeekReader makeUTF8(InputStream in)
          Make PeekReader where the input is UTF8
static PeekReader open(String filename)
           
 int peekChar()
           
 void pushbackChar(int ch)
          push back a character : does not alter underlying position, line or column counts
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 int readChar()
           
static PeekReader readString(String string)
           
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, 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 PeekReader make(Reader r)

make

public static PeekReader make(Reader r,
                              int bufferSize)

makeUTF8

public static PeekReader makeUTF8(InputStream in)
Make PeekReader where the input is UTF8


makeASCII

public static PeekReader makeASCII(InputStream in)
Make PeekReader where the input is ASCII


make

public static PeekReader make(CharStream r)

readString

public static PeekReader readString(String string)

open

public static PeekReader open(String filename)

getLineNum

public long getLineNum()

getColNum

public long getColNum()

getPosition

public long getPosition()

peekChar

public final int peekChar()

readChar

public final int readChar()

pushbackChar

public final void pushbackChar(int ch)
push back a character : does not alter underlying position, line or column counts


close

public final void close()
                 throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Reader
Throws:
IOException

read

public final int read()
               throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public final int read(char[] cbuf,
                      int off,
                      int len)
               throws IOException
Specified by:
read in class Reader
Throws:
IOException

eof

public final boolean eof()


Licenced under the Apache License, Version 2.0