- All Known Implementing Classes:
public interface DataReaderReads bytes from a data stream.
int read(byte target, int offset, int length) throws IOExceptionReads up to
lengthbytes of data from the input.
readLengthis zero then 0 is returned. Otherwise, if no data is available because the end of the opened range has been reached, then
C.RESULT_END_OF_INPUTis returned. Otherwise, the call will block until at least one byte of data has been read and the number of bytes read is returned.
target- A target array into which data should be written.
offset- The offset into the target array at which to write.
length- The maximum number of bytes to read from the input.
- The number of bytes read, or
C.RESULT_END_OF_INPUTif the input has ended. This may be less than
lengthbecause the end of the input (or available data) was reached, the method was interrupted, or the operation was aborted early for another reason.
IOException- If an error occurs reading from the input.