com.caucho.vfs
Class TempCharReader

java.lang.Object
  extended by java.io.Reader
      extended by com.caucho.vfs.TempCharReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class TempCharReader
extends java.io.Reader

Char reader based on an underlying buffer.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
TempCharReader()
          Create a new TempCharReader.
TempCharReader(TempCharBuffer head)
          Create a new TempBuffer.
 
Method Summary
 void close()
          Closes the reader.
 void init(TempCharBuffer head)
          Initialize the reader.
 boolean isEmpty()
          Returns true if it's empty.
 int read()
          Reads the next character.
 int read(char[] buffer, int offset, int length)
          Reads the next character.
 void reset()
          Resets the reader
 void setFree(boolean isFree)
          Set the reader to free the buffer.
 void unread()
           
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempCharReader

public TempCharReader()
Create a new TempCharReader.


TempCharReader

public TempCharReader(TempCharBuffer head)
Create a new TempBuffer.

Method Detail

setFree

public void setFree(boolean isFree)
Set the reader to free the buffer.


init

public void init(TempCharBuffer head)
Initialize the reader.


reset

public void reset()
Resets the reader

Overrides:
reset in class java.io.Reader

read

public int read()
Reads the next character.

Overrides:
read in class java.io.Reader

read

public int read(char[] buffer,
                int offset,
                int length)
Reads the next character.

Specified by:
read in class java.io.Reader

unread

public void unread()

isEmpty

public boolean isEmpty()
Returns true if it's empty.


close

public void close()
Closes the reader.

Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader