Class SocketChannelReader
java.lang.Object
com.sun.corba.ee.impl.transport.SocketChannelReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) Reads all currently available data from the socket channel, appending it to any data left from a previous read.
-
Constructor Details
-
SocketChannelReader
-
-
Method Details
-
read
public ByteBuffer read(SocketChannel channel, ByteBuffer previouslyReadData, int minNeeded) throws IOException Reads all currently available data from the socket channel, appending it to any data left from a previous read.- Parameters:
channel- the channel from which to readpreviouslyReadData- the old data to read; note: all data up to the limit is considered valid.minNeeded- the minimum number of bytes that should be present in the buffer before returning- Returns:
- a buffer containing all old data, with all newly available data appended to it.
- Throws:
IOException- if an error occurs while reading from the channel.
-