jist.swans.app.io
Class Reader

java.lang.Object
  extended by java.io.Reader
      extended by jist.swans.app.io.Reader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public abstract class Reader
extends java.io.Reader

A functionally identical port of java.io.Reader, primarily brought into jist.swans.app.io package so that it could be dynamically rewritten.

Since:
SWANS1.0
Version:
$Id: Reader.java,v 1.4 2004/04/06 16:07:46 barr Exp $
Author:
Sun Microsystems, Rimon Barr <barr+jist@cs.cornell.edu>

Field Summary
protected  java.lang.Object lock
          read lock.
private static int maxSkipBufferSize
          maximum skip buffer size.
private  char[] skipBuffer
          skipped content.
 
Constructor Summary
protected Reader()
           
protected Reader(java.lang.Object lock)
           
 
Method Summary
abstract  void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] cbuf)
           
abstract  int read(char[] cbuf, int off, int len)
           
 boolean ready()
           
 void reset()
           
 long skip(long n)
           
 
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
 

Field Detail

maxSkipBufferSize

private static final int maxSkipBufferSize
maximum skip buffer size.

See Also:
Constant Field Values

lock

protected java.lang.Object lock
read lock.


skipBuffer

private char[] skipBuffer
skipped content.

Constructor Detail

Reader

protected Reader()
See Also:
Reader

Reader

protected Reader(java.lang.Object lock)
See Also:
Reader
Method Detail

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

read

public int read(char[] cbuf)
         throws java.io.IOException
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

read

public abstract int read(char[] cbuf,
                         int off,
                         int len)
                  throws java.io.IOException
Specified by:
read in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

ready

public boolean ready()
              throws java.io.IOException
Overrides:
ready in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.Reader
See Also:
Reader

mark

public void mark(int readAheadLimit)
          throws java.io.IOException
Overrides:
mark in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader

close

public abstract void close()
                    throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader
Throws:
java.io.IOException
See Also:
Reader