java.lang.Object
java.io.Reader
org.apache.xmlbeans.impl.store.Saver.TextReader
- Enclosing class:
- Saver
- static final class Saver.TextReader
- extends java.io.Reader
|
Method Summary |
private void |
checkClosed()
|
void |
close()
Closes the stream. |
int |
read()
Reads an char from the input stream and returns it
as an int in the range of 0-65535. |
int |
read(char[] cbuf)
Reads chars from a stream and stores them into a caller
supplied buffer. |
int |
read(char[] cbuf,
int off,
int len)
Read chars from a stream and stores them into a caller
supplied buffer. |
boolean |
ready()
Determines whether or not 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 |
_locale
private Locale _locale
_textSaver
private Saver.TextSaver _textSaver
_closed
private boolean _closed
Saver.TextReader
Saver.TextReader(Cur c,
org.apache.xmlbeans.XmlOptions options)
close
public void close()
throws java.io.IOException
- Description copied from class:
java.io.Reader
- Closes the stream. Any futher attempts to read from the
stream may generate an
IOException.
ready
public boolean ready()
throws java.io.IOException
- Description copied from class:
java.io.Reader
- Determines whether or not this stream is ready to be
read. If it returns
false the stream may block if a
read is attempted, but it is not guaranteed to do so.
This method always returns false in this class
read
public int read()
throws java.io.IOException
- Description copied from class:
java.io.Reader
- Reads an char from the input stream and returns it
as an int in the range of 0-65535. This method also will return -1 if
the end of the stream has been reached.
This method will block until the char can be read.
read
public int read(char[] cbuf)
throws java.io.IOException
- Description copied from class:
java.io.Reader
- Reads chars from a stream and stores them into a caller
supplied buffer. This method attempts to completely fill the buffer,
but can return before doing so. The actual number of chars read is
returned as an int. A -1 is returned to indicate the end of the stream.
This method will block until some data can be read.
This method operates by calling an overloaded read method like so:
read(buf, 0, buf.length)
read
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Description copied from class:
java.io.Reader
- Read chars from a stream and stores them into a caller
supplied buffer. It starts storing the data at index
offset
into the buffer and attempts to read len chars. This method
can return before reading the number of chars requested. The actual
number of chars read is returned as an int. A -1 is returned to indicate
the end of the stream.
This method will block until some data can be read.
This method operates by calling the single char read() method
in a loop until the desired number of chars are read. The read loop
stops short if the end of the stream is encountered or if an IOException
is encountered on any read operation except the first. If the first
attempt to read a chars fails, the IOException is allowed to propagate
upward. And subsequent IOException is caught and treated identically
to an end of stream condition. Subclasses can (and should if possible)
override this method to provide a more efficient implementation.
checkClosed
private void checkClosed()
throws java.io.IOException