org.apache.crimson.parser
Class XmlReader.Utf8Reader
java.lang.Object
java.io.Reader
org.apache.crimson.parser.XmlReader.BaseReader
org.apache.crimson.parser.XmlReader.Utf8Reader
- Enclosing class:
- XmlReader
- static final class XmlReader.Utf8Reader
- extends XmlReader.BaseReader
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nextChar
private char nextChar
instream
protected InputStream instream
buffer
protected byte[] buffer
start
protected int start
finish
protected int finish
XmlReader.Utf8Reader
XmlReader.Utf8Reader(InputStream stream)
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 bufferoffset
- Offset at which to start storing characterslen
- 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