| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static final int | |
| private static final int | |
| private final CharBuffer | |
| private final CharBuffer | |
| private final PumpReader. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized int | |
| public synchronized void | close()
Implements abstract java. Implements java. Closes the stream and releases any system resources associated with it. |
| private int | |
| public InputStream | |
| private void | |
| pack-priv synchronized void | |
| public Writer | |
| public synchronized int | |
| public synchronized int | read(char[] cbuf, int off, int len)
Implements abstract java. Reads characters into a portion of an array. |
| public synchronized int | read(CharBuffer target)
Overrides java. Implements java. Attempts to read characters into the specified character buffer. |
| pack-priv synchronized int | |
| pack-priv synchronized void | |
| public synchronized boolean | |
| private static boolean | |
| private boolean | Returns: If more input is availableAttempts to find additional input by rewinding the |
| private void | |
| private boolean | Returns: true ifbuffer.hasRemaining() == true; false otherwise
when reader is closedWaits until |
| private void | waitForBufferSpace()
Blocks until there is new space available for buffering or the reader is closed. |
| private boolean | Returns: true if input is available, false if no input is available and the reader is closedBlocks until input is available or the reader is closed. |
| private boolean | Returns: true if more input is available, false if no additional input is available and the reader is closedBlocks until more input is available, even if |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| pack-priv synchronized void |
| closed | back to summary |
|---|---|
| private boolean closed | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_BUFFER_SIZE | |
| EOF | back to summary |
|---|---|
| private static final int EOF | |
| readBuffer | back to summary |
|---|---|
| private final CharBuffer readBuffer | |
| writeBuffer | back to summary |
|---|---|
| private final CharBuffer writeBuffer | |
| writer | back to summary |
|---|---|
| private final PumpReader. | |
| PumpReader | back to summary |
|---|---|
| public PumpReader() | |
| PumpReader | back to summary |
|---|---|
| public PumpReader(int bufferSize) | |
| available | back to summary |
|---|---|
| public synchronized int available() | |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.
| |
| copyFromBuffer | back to summary |
|---|---|
| private int copyFromBuffer(char[] cbuf, int off, int len) | |
| createInputStream | back to summary |
|---|---|
| public InputStream createInputStream(Charset charset) | |
| encodeBytes | back to summary |
|---|---|
| private void encodeBytes(CharsetEncoder encoder, ByteBuffer output) throws IOException | |
| flush | back to summary |
|---|---|
| pack-priv synchronized void flush() | |
| getWriter | back to summary |
|---|---|
| public Writer getWriter() | |
| read | back to summary |
|---|---|
| public synchronized int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public synchronized int read(char[] cbuf, int off, int len) throws IOException Implements abstract java. Doc from java. Reads 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. If
| |
| read | back to summary |
|---|---|
| public synchronized int read(CharBuffer target) throws IOException Overrides java. Implements java. Doc from java. Attempts to read characters into the specified character buffer. The buffer is used as a repository of characters as-is: the only changes made are the results of a put operation. No flipping or rewinding of the buffer is performed. If the length of the specified character buffer is zero, then no characters will be read and zero will be returned.
| |
| readBytes | back to summary |
|---|---|
| pack-priv synchronized int readBytes(CharsetEncoder encoder, byte[] b, int off, int len) throws IOException | |
| readBytes | back to summary |
|---|---|
| pack-priv synchronized void readBytes(CharsetEncoder encoder, ByteBuffer output) throws IOException | |
| ready | back to summary |
|---|---|
| public synchronized boolean ready() Overrides java. Doc from java. Tells whether this stream is ready to be read.
| |
| rewind | back to summary |
|---|---|
| private static boolean rewind(CharBuffer buffer, CharBuffer other) | |
| rewindReadBuffer | back to summary |
|---|---|
| private boolean rewindReadBuffer() Attempts to find additional input by rewinding the
| |
| rewindWriteBuffer | back to summary |
|---|---|
| private void rewindWriteBuffer() Attempts to find additional buffer space by rewinding the | |
| wait | back to summary |
|---|---|
| private boolean wait(CharBuffer buffer) throws InterruptedIOException Waits until
| |
| waitForBufferSpace | back to summary |
|---|---|
| private void waitForBufferSpace() throws InterruptedIOException, ClosedException Blocks until there is new space available for buffering or the reader is closed.
| |
| waitForInput | back to summary |
|---|---|
| private boolean waitForInput() throws InterruptedIOException Blocks until input is available or the reader is closed.
| |
| waitForMoreInput | back to summary |
|---|---|
| private boolean waitForMoreInput() throws InterruptedIOException Blocks until more input is available, even if
| |
| write | back to summary |
|---|---|
| pack-priv synchronized void write(char c) throws IOException | |
| write | back to summary |
|---|---|
| pack-priv synchronized void write(char[] cbuf, int off, int len) throws IOException | |
| write | back to summary |
|---|---|
| pack-priv synchronized void write(String str, int off, int len) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| private final CharsetEncoder | |
| private final PumpReader |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private int | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[] b, int off, int len)
Overrides java. Reads up to |
| private boolean |
| buffer | back to summary |
|---|---|
| private final ByteBuffer buffer | |
| encoder | back to summary |
|---|---|
| private final CharsetEncoder encoder | |
| reader | back to summary |
|---|---|
| private final PumpReader reader | |
| InputStream | back to summary |
|---|---|
| private InputStream(PumpReader reader, Charset charset) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on 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's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| copyFromBuffer | back to summary |
|---|---|
| private int copyFromBuffer(byte[] b, int off, int len) | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from 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
| |
| readUsingBuffer | back to summary |
|---|---|
| private boolean readUsingBuffer() throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private final PumpReader |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. Closes the stream, flushing it first. |
| public void | flush()
Implements abstract java. Implements java. Flushes the stream. |
| public void | |
| public void | write(char[] cbuf, int off, int len)
Implements abstract java. Writes a portion of an array of characters. |
| public void |
| reader | back to summary |
|---|---|
| private final PumpReader reader | |
| Writer | back to summary |
|---|---|
| private Writer(PumpReader reader) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. Doc from java. Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams. If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| write | back to summary |
|---|---|
| public void write(int c) throws IOException Overrides java. Doc from java. Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored. Subclasses that intend to support efficient single-character output should override this method.
| |
| write | back to summary |
|---|---|
| public void write(char[] cbuf, int off, int len) throws IOException Implements abstract java. Doc from java. Writes a portion of an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(String str, int off, int len) throws IOException Overrides java. Doc from java. Writes a portion of a string.
| |