public interface SeekableByteChannel extends MxsByteChannel
Modifier and Type | Method and Description |
---|---|
long |
position()
Returns this channel's position
|
SeekableByteChannel |
position(long newPosition)
Sets this channel's position.
|
long |
size()
Returns the current size of entity to which this channel is connected.
|
SeekableByteChannel |
truncate(long size)
Truncates the entity, to which this channel is connected, to the given size.
|
cancel
long position() throws java.io.IOException
java.io.IOException
SeekableByteChannel position(long newPosition) throws java.io.IOException
newPosition
- The new position, a non-negative integer counting the number of bytes from the beginning of the entityjava.io.IOException
long size() throws java.io.IOException
java.io.IOException
SeekableByteChannel truncate(long size) throws java.io.IOException
size
- The new size, a non-negative byte countjava.io.IOException