|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Reader | +--jess.awt.TextReader
A very simple reader, something like StringBufferReader but you can add text to it. Useful for creating GUIs in which you want Jess to continually read input from a text widget.
(C) 1998 E.J. Friedman-Hill and the Sandia Corporation
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
TextReader(boolean dontWait)
Create a TextReader. |
Method Summary | |
void |
appendText(java.lang.String s)
Add text to the internal buffer. |
int |
available()
Find out if any input is waiting to be read. |
void |
clear()
Remove all text from the internal buffer. |
void |
close()
Does nothing. |
int |
read()
Read a character from the internal buffer. |
int |
read(char[] c)
Read an array of characters from the internal buffer. |
int |
read(char[] c,
int start,
int count)
Read part of an array of characters from the internal buffer. |
Methods inherited from class java.io.Reader |
mark, markSupported, ready, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextReader(boolean dontWait)
dontWait
- If true, read() will return EOF (-1) immediately when
its internal buffer is empty. If false, read() will block until more input
becomes available.Method Detail |
public int read()
read
in class java.io.Reader
public int read(char[] c) throws java.io.IOException
read
in class java.io.Reader
public int read(char[] c, int start, int count) throws java.io.IOException
read
in class java.io.Reader
java.io.Writer#read
public void close()
close
in class java.io.Reader
public int available()
public void appendText(java.lang.String s)
s
- New text to add to the bufferread()
public void clear()
|
© 1997 E.J. Friedman-Hill and Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |