org.objectweb.jac.util
Class PushbackReader

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.FilterReader
          extended byjava.io.PushbackReader
              extended byorg.objectweb.jac.util.PushbackReader

public class PushbackReader
extends PushbackReader

A PushbackReader which keeps track of the position in the stream

See Also:
getPosition()

Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
PushbackReader(Reader in)
           
PushbackReader(Reader in, int size)
           
 
Method Summary
 int getPosition()
          Returns the position in the stream
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 void unread(char[] cbuf, int off, int len)
           
 void unread(int c)
           
 
Methods inherited from class java.io.PushbackReader
close, mark, markSupported, ready, reset, skip, unread
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushbackReader

public PushbackReader(Reader in)

PushbackReader

public PushbackReader(Reader in,
                      int size)
Parameters:
in - reader to read from
size - bushback buffer size
See Also:
PushbackReader.PushbackReader(Reader,int)
Method Detail

read

public int read()
         throws IOException
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Throws:
IOException

unread

public void unread(int c)
            throws IOException
Throws:
IOException

unread

public void unread(char[] cbuf,
                   int off,
                   int len)
            throws IOException
Throws:
IOException

getPosition

public int getPosition()
Returns the position in the stream