Buffers which are supplied by the receiveData method. The stream consumes the
Buffers: after all data has been read from a Buffer, Buffer#dispose() is called.
Note, that StreamReader implementation may not be thread-safe.
StreamWriter, Connection
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public < decoded data type E> GrizzlyFuture | Returns: Future, which will hold the decoding state.Read and decode data from the StreamReader |
| public < decoded data type E> GrizzlyFuture | Returns: Future, which will hold the decoding state.CompletionHandler, which will be notified, when decoder will become ready.Read and decode data from the StreamReader |
| public Buffer | |
| public boolean | Returns: true if StreamReader has available data, which could be read, or false otherwise.Return true if StreamReader has available data, which could be read, or false otherwise. |
| public boolean | Returns: true, if StreamReader has been closed, or false otherwise.Returns true, if StreamReader has been closed, or false otherwise. |
| public boolean | |
| public GrizzlyFuture | Returns: Future, using which it's possible to check whether StreamReader has required amount of bytes
available for reading.number of bytes, which should become available on StreamReader. size)Method returns |
| public GrizzlyFuture | Returns: Future, using which it's possible to check whether StreamReader has required amount of bytes
available for reading.number of bytes, which should become available on StreamReader. size, CompletionHandler<Integer> CompletionHandler, which will be notified once required number of bytes will become
available.Method returns |
| public GrizzlyFuture | |
| public GrizzlyFuture | notifyCondition(Condition
Condition StreamReader should meet.CompletionHandler, which will be notified, once the Condition will be
satisfied.Method returns |
| public boolean | |
| public void | |
| public byte | |
| public void | |
| public void | |
| public void | |
| public char | |
| public void | |
| public double | |
| public void | |
| public float | |
| public void | |
| public int | |
| public void | |
| public long | |
| public void | |
| public short | |
| public void | |
| public void | |
| public Buffer |
| available | back to summary |
|---|---|
| public int available() Return the number of bytes available for get calls. An attempt to get more data than is present in the stream will either result in blocking (if isBlocking() returns true) or a BufferUnderflowException. | |
| decode | back to summary |
|---|---|
| public <E> GrizzlyFuture Read and decode data from the StreamReader
| |
| decode | back to summary |
|---|---|
| public <E> GrizzlyFuture Read and decode data from the StreamReader
| |
| getBufferWindow | back to summary |
|---|---|
| public Buffer getBufferWindow() | |
| hasAvailable | back to summary |
|---|---|
| public boolean hasAvailable() Return true if StreamReader has available data, which could be read, or false otherwise.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Returns true, if StreamReader has been closed, or false otherwise.
| |
| isSupportBufferWindow | back to summary |
|---|---|
| public boolean isSupportBufferWindow() | |
| notifyAvailable | back to summary |
|---|---|
| public GrizzlyFuture Method returns
| |
| notifyAvailable | back to summary |
|---|---|
| public GrizzlyFuture Method returns
| |
| notifyCondition | back to summary |
|---|---|
| public GrizzlyFuture Method returns | |
| notifyCondition | back to summary |
|---|---|
| public GrizzlyFuture Method returns
| |
| readBoolean | back to summary |
|---|---|
| public boolean readBoolean() throws IOException Get the next boolean in the stream. Requires 1 byte. | |
| readBooleanArray | back to summary |
|---|---|
| public void readBooleanArray(boolean[] data) throws IOException Fill data with booleans (byte 1=true, 0=false) from the stream. If this method returns normally, data has been filled completely. Requires data.length bytes. | |
| readByte | back to summary |
|---|---|
| public byte readByte() throws IOException Get the next byte in the stream. Requires 1 byte. | |
| readByteArray | back to summary |
|---|---|
| public void readByteArray(byte[] data) throws IOException Fill data with bytes from the stream. If this method returns normally, data has been filled completely. Requires data.length bytes. | |
| readByteArray | back to summary |
|---|---|
| public void readByteArray(byte[] data, int offset, int length) throws IOException Fill data with bytes from the stream. If this method returns normally, data has been filled completely. Requires data.length bytes. | |
| readBytes | back to summary |
|---|---|
| public void readBytes(Buffer buffer) throws IOException Fill the buffer with data from the stream (that is, copy data from the stream to fill buffer from position to limit). This is useful when data must be read from one stream and then added to another stream for further processing. | |
| readChar | back to summary |
|---|---|
| public char readChar() throws IOException Get the next character in the stream. Requires 2 bytes. | |
| readCharArray | back to summary |
|---|---|
| public void readCharArray(char[] data) throws IOException Fill data with characters from the stream. If this method returns normally, data has been filled completely. Requires 2*data.length bytes. | |
| readDouble | back to summary |
|---|---|
| public double readDouble() throws IOException Get the next double in the stream. Requires 8 bytes. | |
| readDoubleArray | back to summary |
|---|---|
| public void readDoubleArray(double[] data) throws IOException Fill data with characters from the stream. If this method returns normally, data has been filled completely. Requires 8*data.length bytes. | |
| readFloat | back to summary |
|---|---|
| public float readFloat() throws IOException Get the next float in the stream. Requires 4 bytes. | |
| readFloatArray | back to summary |
|---|---|
| public void readFloatArray(float[] data) throws IOException Fill data with characters from the stream. If this method returns normally, data has been filled completely. Requires 4*data.length bytes. | |
| readInt | back to summary |
|---|---|
| public int readInt() throws IOException Get the next int in the stream. Requires 4 bytes. | |
| readIntArray | back to summary |
|---|---|
| public void readIntArray(int[] data) throws IOException Fill data with characters from the stream. If this method returns normally, data has been filled completely. Requires 4*data.length bytes. | |
| readLong | back to summary |
|---|---|
| public long readLong() throws IOException Get the next long in the stream. Requires 8 bytes. | |
| readLongArray | back to summary |
|---|---|
| public void readLongArray(long[] data) throws IOException Fill data with characters from the stream. If this method returns normally, data has been filled completely. Requires 8*data.length bytes. | |
| readShort | back to summary |
|---|---|
| public short readShort() throws IOException Get the next short in the stream. Requires 2 bytes. | |
| readShortArray | back to summary |
|---|---|
| public void readShortArray(short[] data) throws IOException Fill data with characters from the stream. If this method returns normally, data has been filled completely. Requires 2*data.length bytes. | |
| skip | back to summary |
|---|---|
| public void skip(int length) | |
| takeBufferWindow | back to summary |
|---|---|
| public Buffer takeBufferWindow() | |