gnu.text
Class QueueReader

java.lang.Object
  extended by java.io.Reader
      extended by gnu.text.QueueReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class QueueReader
extends java.io.Reader

An InPort that reads from a queue. The method append can be used to write chars to the end of the queue.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
QueueReader()
           
 
Method Summary
 void append(char ch)
           
 void append(char[] chars)
           
 void append(char[] chars, int off, int len)
           
 void append(java.lang.String str)
           
 void appendEOF()
          For the writer to signal that there is no more data to append.
 void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 boolean ready()
           
 void reset()
           
 
Methods inherited from class java.io.Reader
read, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueReader

public QueueReader()
Method Detail

markSupported

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

mark

public void mark(int readAheadLimit)
Overrides:
mark in class java.io.Reader

reset

public void reset()
Overrides:
reset in class java.io.Reader

append

public void append(java.lang.String str)

append

public void append(char[] chars)

append

public void append(char[] chars,
                   int off,
                   int len)

append

public void append(char ch)

appendEOF

public void appendEOF()
For the writer to signal that there is no more data to append.


ready

public boolean ready()
Overrides:
ready in class java.io.Reader

read

public int read()
Overrides:
read in class java.io.Reader

read

public int read(char[] cbuf,
                int off,
                int len)
Specified by:
read in class java.io.Reader

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader