public interface IStreamReader
| Modifier and Type | Method and Description |
|---|---|
int |
available(byte[] buffer,
int off,
int len)
Determines how many bytes can be read from the input buffer after
receiving new data from the remote end.
|
int |
available(ByteBuffer buffer,
boolean flipped)
Determines how many bytes can be read from the input buffer after
receiving new data from the remote end.
|
void |
read(byte[] data)
Called when new bytes were read from the input buffer.
|
void |
read(ByteBuffer data)
Called when new bytes were read from the input buffer.
|
int available(ByteBuffer buffer, boolean flipped)
read method.
This method is called only if the input buffer is not backed by an array.
The type of the input buffer is specified by the implementation of the
ISessionStructureFactory returned by the
getFactory method.
The inner state of the passed buffer cannot be changed by this method.
buffer - the input buffer.flipped - specifies the current mode of the bufferint available(byte[] buffer,
int off,
int len)
read method.
This method is called only if the input buffer is backed by an array. The
type of the input buffer is specified by the implementation of the
ISessionStructureFactory returned by the
getFactory method.
The content of the passed buffer cannot be changed by this method.
buffer - the array that backs the input buffer.off - the offset of the arraylen - the number of the bytes in the arrayvoid read(byte[] data)
available method that was called recently.
The passed array can be safely stored or modified by this method as it will not be used by the caller.
data - bytes that was read from the input buffer.void read(ByteBuffer data)
data - bytes that was read from the input buffer.Copyright © 2017–2022 SNF4J.ORG. All rights reserved.