|
Many protocols use a data type which has a data length field as a prefix. It will be very useful if users can check if the buffer contains the whole data by inspecting the data length field before start reading the data. ByteBuffer.prefixedDataAvailable() will let users do this trivial and repetitive task with just one method call.
|