org.apache.crimson.parser
Class XmlReader.AsciiReader

java.lang.Object
  extended byjava.io.Reader
      extended byorg.apache.crimson.parser.XmlReader.BaseReader
          extended byorg.apache.crimson.parser.XmlReader.AsciiReader
Enclosing class:
XmlReader

static final class XmlReader.AsciiReader
extends XmlReader.BaseReader


Field Summary
protected  byte[] buffer
           
protected  int finish
           
protected  InputStream instream
           
protected  int start
           
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
(package private) XmlReader.AsciiReader(InputStream in)
           
 
Method Summary
 void close()
          Close the stream.
 int read(char[] buf, int offset, int len)
          Read characters into a portion of an array.
 boolean ready()
          Tell whether this stream is ready to be read.
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instream

protected InputStream instream

buffer

protected byte[] buffer

start

protected int start

finish

protected int finish
Constructor Detail

XmlReader.AsciiReader

XmlReader.AsciiReader(InputStream in)
Method Detail

read

public int read(char[] buf,
                int offset,
                int len)
         throws IOException
Description copied from class: Reader
Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

Specified by:
read in class Reader
Parameters:
buf - Destination buffer
offset - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

ready

public boolean ready()
              throws IOException
Description copied from class: Reader
Tell whether this stream is ready to be read.

Overrides:
ready in class Reader
Returns:
True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Description copied from class: Reader
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.

Specified by:
close in class Reader
Throws:
IOException - If an I/O error occurs