org.apache.xerces.impl
Class XMLEntityManager.OneCharReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--org.apache.xerces.impl.XMLEntityManager.OneCharReader
- Enclosing class:
- XMLEntityManager
- protected class XMLEntityManager.OneCharReader
- extends java.io.FilterReader
A reader that reads only one character at a time. This is
needed for those times when we've auto-detected the encoding
from an input stream and need to swap out the reader once
the xmlDecl/textDecl has been read and processed. If we
read too far, then we could erroneously convert bytes from
the input stream to the wrong character code point.
- Author:
- Andy Clark, IBM
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Method Summary |
java.io.Reader |
getReader()
Returns the original reader. |
int |
read()
Returns a single character. |
int |
read(char[] ch,
int offset,
int length)
Reads as many characters as possible which, in this case,
is only a single character. |
Methods inherited from class java.io.FilterReader |
close,
mark,
markSupported,
ready,
reset,
skip |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XMLEntityManager.OneCharReader
public XMLEntityManager.OneCharReader(java.io.Reader reader)
- Constructs this reader from another reader.
getReader
public java.io.Reader getReader()
- Returns the original reader.
read
public int read()
throws java.io.IOException
- Returns a single character.
- Overrides:
- read in class java.io.FilterReader
read
public int read(char[] ch,
int offset,
int length)
throws java.io.IOException
- Reads as many characters as possible which, in this case,
is only a single character.
- Overrides:
- read in class java.io.FilterReader
Copyright © 1999-2001 Apache XML Project. All Rights Reserved.