@CleanupObligation public abstract class DecoratingSeekableByteChannel extends Object implements SeekableByteChannel
Modifier and Type | Field and Description |
---|---|
protected SeekableByteChannel |
delegate
The nullable decorated seekable byte channel.
|
Modifier | Constructor and Description |
---|---|
protected |
DecoratingSeekableByteChannel(SeekableByteChannel delegate)
Constructs a new decorating seekable byte 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) |
@Nullable protected SeekableByteChannel delegate
@CreatesObligation protected DecoratingSeekableByteChannel(@Nullable@WillCloseWhenClosed SeekableByteChannel delegate)
delegate
- the nullable seekable byte channel to decorate.@DischargesObligation public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
public long position() throws IOException
position
in interface SeekableByteChannel
IOException
public SeekableByteChannel position(long newPosition) throws IOException
position
in interface SeekableByteChannel
IOException
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
read
in interface SeekableByteChannel
IOException
public long size() throws IOException
size
in interface SeekableByteChannel
IOException
public String toString()
public SeekableByteChannel truncate(long size) throws IOException
truncate
in interface SeekableByteChannel
IOException
public int write(ByteBuffer src) throws IOException
write
in interface SeekableByteChannel
write
in interface WritableByteChannel
IOException
Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.