public abstract class DecoratingSeekableChannel extends AbstractSeekableChannel
Note that sub-classes of this class may implement their own virtual file pointer. Thus, if you would like to use the decorated seekable byte channel again after you have finished using this seekable byte channel, then you should not assume a particular position of the file pointer of the decorated seekable byte channel.
Modifier and Type | Field and Description |
---|---|
protected SeekableByteChannel |
channel
The nullable decorated seekable byte channel.
|
Modifier | Constructor and Description |
---|---|
protected |
DecoratingSeekableChannel() |
protected |
DecoratingSeekableChannel(SeekableByteChannel channel) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
SeekableByteChannel |
position(long newPosition) |
int |
read(ByteBuffer dst) |
long |
size() |
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer src) |
checkOpen
@Nullable @WillCloseWhenClosed protected SeekableByteChannel channel
protected DecoratingSeekableChannel()
protected DecoratingSeekableChannel(@WillCloseWhenClosed SeekableByteChannel channel)
@DischargesObligation public void close() throws IOException
IOException
public boolean isOpen()
public long position() throws IOException
IOException
public SeekableByteChannel position(long newPosition) throws IOException
IOException
public int read(ByteBuffer dst) throws IOException
IOException
public long size() throws IOException
IOException
public String toString()
public SeekableByteChannel truncate(long size) throws IOException
IOException
public int write(ByteBuffer src) throws IOException
IOException
Copyright © 2012–2016 Schlichtherle IT Services. All rights reserved.