| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private static final int | |
| private static final int | |
| private CharsetEncoder | |
| private boolean | |
| private final Object | |
| private int | |
| private int | |
| private final Reader | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | ReaderInputStream(Reader
java.io.Reader object to be read data from. reader)Creates ReaderInputStream from a given Reader type object with a default encoding. |
| public | ReaderInputStream(Reader
java.io.Reader object to be read data from. reader, String an encoding of the created stream. encoding)Creates ReaderInputStream from a given Reader type object with a specifed encoding. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | Returns: an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking or0 when
it reaches the end of the input stream.Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private void | |
| private void | |
| private void | |
| public synchronized void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readlimit)Overrides java. Marks the current position in this input stream. |
| public boolean | Returns: true if this stream instance supports the mark
and reset methods; false otherwise.Overrides java. Tests if this input stream supports the |
| public int | Returns: the next byte of data, or-1 if the end of the
stream is reached.Implements abstract java. Reads the next byte of data from the input stream. |
| public int | Returns: the total number of bytes read into the buffer, or-1 is there is no more data because the end of
the stream has been reached.the buffer into which the data is read. b)Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array |
| public int | Returns: the total number of bytes read into the buffer, or-1 if there is no more data because the end of
the stream has been reached.the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| public synchronized void | reset()
Overrides java. Repositions this stream to the position at the time the
|
| public long | Returns: the actual number of bytes skipped.the number of bytes to be skipped. n)Overrides java. Skips over and discards |
| bytes | back to summary |
|---|---|
| private byte[] bytes | |
| DEFAULT_BYTE_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_BYTE_BUFFER_SIZE | |
| DEFAULT_CHAR_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_CHAR_BUFFER_SIZE | |
| encoder | back to summary |
|---|---|
| private CharsetEncoder encoder | |
| isOpen | back to summary |
|---|---|
| private boolean isOpen | |
| lock | back to summary |
|---|---|
| private final Object lock | |
| markedIndex | back to summary |
|---|---|
| private int markedIndex | |
| position | back to summary |
|---|---|
| private int position | |
| reader | back to summary |
|---|---|
| private final Reader reader | |
| readlimit | back to summary |
|---|---|
| private int readlimit | |
| totalBytes | back to summary |
|---|---|
| private int totalBytes | |
| ReaderInputStream | back to summary |
|---|---|
| public ReaderInputStream(Reader reader) Creates ReaderInputStream from a given Reader type object with a default encoding.
| |
| ReaderInputStream | back to summary |
|---|---|
| public ReaderInputStream(Reader reader, String encoding) Creates ReaderInputStream from a given Reader type object with a specifed encoding. | |
| appendBytes | back to summary |
|---|---|
| private void appendBytes(List<byte[]> list, ByteBuffer bb) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. The next invocation might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass' implementation of this method may choose to throw an
The
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream.
| |
| confirmOpen | back to summary |
|---|---|
| private void confirmOpen() throws IOException | |
| fillByteBuffer | back to summary |
|---|---|
| private void fillByteBuffer(Reader reader) throws IOException | |
| getByteArray | back to summary |
|---|---|
| private void getByteArray(List<byte[]> list) | |
| mark | back to summary |
|---|---|
| public synchronized void mark(int readlimit) Overrides java. Marks the current position in this input stream. A subsequent call to
the The The general contract of Marking a closed stream should not have any effect on the stream. The
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Tests if this input stream supports the
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Reads the next byte of data from the input stream. The value byte is
returned as an A subclass must provide an implementation of this method.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b) throws IOException Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array If the length of The first byte read is stored into element The
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements The
| |
| reset | back to summary |
|---|---|
| public synchronized void reset() throws IOException Overrides java. Repositions this stream to the position at the time the
The general contract of
| |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Skips over and discards
| |