read
Reads data from the File for which this stream belongs, into the provided array. Bytes are read starting at the current FileStream.position. The FileStream.position will automatically increment by the number of bytes that have been read.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs.
Parameters
The array to place data into.
Throws
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided array. Bytes are read starting at the current FileStream.position. The FileStream.position will automatically increment by the number of bytes that have been read.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs.
Parameters
The array to place data into.
The index in buf to start placing data.
Throws
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided array. Bytes are read starting at the specified position. The FileStream.position will not be changed.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs at the specified position.
Parameters
The array to place data into.
The file offset (from the start of the File) to begin reading at.
Throws
If position is less than 0.
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided array. Bytes are read starting at the specified position. The FileStream.position will not be changed.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs at the specified position.
Parameters
The array to place data into.
The index in buf to start placing data.
The file offset (from the start of the File) to begin reading at.
Throws
If position is less than 0.
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided buffer. Bytes are read starting at the current FileStream.position. The FileStream.position will automatically increment by the number of bytes that have been read.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs.
Parameters
The buffer to place data into.
Throws
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided buffer. Bytes are read starting at the current FileStream.position. The FileStream.position will automatically increment by the number of bytes that have been read.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs.
Parameters
The buffer to place data into.
The index in buf to start placing data.
Throws
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided buffer. Bytes are read starting at the specified position. The FileStream.position will not be changed.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs at the specified position.
Parameters
The buffer to place data into.
The file offset (from the start of the File) to begin reading at.
Throws
If position is less than 0.
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided buffer. Bytes are read starting at the specified position. The FileStream.position will not be changed.
Return
The number of bytes read into buf, or -1
if no more data is available from the File for which this Read stream belongs at the specified position.
Parameters
The buffer to place data into.
The index in buf to start placing data.
The file offset (from the start of the File) to begin reading at.
Throws
If position is less than 0.
If an I/O error occurs, or the stream is closed.
Reads data from the File for which this stream belongs, into the provided ByteBuffer. Bytes are read starting at the current FileStream.position. The FileStream.position will automatically increment by the number of bytes that have been read.
Otherwise, this function behaves as specified in ReadableByteChannel.
Reads data from the File for which this stream belongs, into the provided ByteBuffer. Bytes are read starting at the specified position. The FileStream.position will not be changed.
Otherwise, this function behaves exactly like the positional java.nio.channels.FileChannel.read function.
Parameters
The buffer to place data into.
The file offset (from the start of the File) to begin reading at.
Throws
If position is less than 0.
If an I/O error occurs.