All Packages Class Hierarchy This Package Previous Next Index

Class org.jfouffa.parser.html.ASCIIReader

java.lang.Object
   |
   +----org.jfouffa.parser.html.ASCIIReader

public class ASCIIReader
extends Object
implements Reader, ParserConstants
The input stream for the ML parser


Constructor index

 o ASCIIReader(Reader)
Create a character-input stream

Method index

 o close()
Close the stream.
 o getColumn()
Returns the current column number.
 o getLine()
Returns the current line number.
 o gotoMark()
Go to the last mark() call.
 o mark()
Mark the current position of the stream.
 o peek()
Peek a character in the stream.
 o pushback(char)
Push back a chacracter into the stream.
 o pushback(String)
Push back a string into the stream.
 o read()
Read a single character.
 o see()
DEBUG

Constructors

 o ASCIIReader
 public ASCIIReader(Reader in)
Create a character-input stream

Parameters:
in - A Reader

Methods

 o read
 public int read() throws IOException
Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.

Subclasses that intend to support efficient single-character input should override this method.

Returns:
The character read, as an integer in the range 0 to 16383 (0x00-0xffff), or -1 if the end of the stream has been reached
Throws: IOException
If an I/O error occurs
 o peek
 public int peek() throws IOException
Peek a character in the stream.

Returns:
The character read, as an integer in the range 0 to 16383 (0x00-0xffff), or -1 if the end of the stream has been reached
Throws: IOException
If an I/O error occurs
 o pushback
 public void pushback(String s)
Push back a string into the stream.

Parameters:
s - the string to push back.
 o pushback
 public void pushback(char c)
Push back a chacracter into the stream.

Parameters:
c - the character to push back.
 o getLine
 public int getLine()
Returns the current line number.

Returns:
the current line number
 o getColumn
 public int getColumn()
Returns the current column number.

Returns:
the current column number.
 o close
 public void close() throws IOException
Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.

Throws: IOException
If an I/O error occurs
 o mark
 public void mark() throws IOException
Mark the current position of the stream.

Throws: IOException
If an I/O error occurs
 o gotoMark
 public void gotoMark() throws IOException
Go to the last mark() call.

Throws: IOException
the last mark can't be reached.
 o see
 public void see()
DEBUG