position
Returns this channel's position.
This method violates the contract of position as it will not throw any exception when invoked on a closed channel. Instead it will return the position the channel had when close has been called.
Sets the channel's position to newPosition.
The argument is the number of bytes counted from the start of the data source. The position cannot be set to a value that is negative. The new position can be set beyond the current size. If set beyond the current size, attempts to read will return end-of-file. Write operations will succeed but they will fill the bytes between the current end of the data source and the new position with the required number of (unspecified) byte values.
Return
the channel.
Throws
if the new position is negative.
if this channel is closed.
if another I/O error occurs.
set the position based on the given channel number and relative offset
Return
global position of all channels as if they are a single channel
Parameters
the channel number
the relative offset in the corresponding channel
Throws
if positioning fails