@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public abstract class DecoratingSeekableByteChannel
extends java.lang.Object
implements java.nio.channels.SeekableByteChannel
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.channels.SeekableByteChannel |
delegate
The nullable decorated seekable byte channel.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DecoratingSeekableByteChannel(java.nio.channels.SeekableByteChannel channel)
Constructs a new decorating seekable byte channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
java.nio.channels.SeekableByteChannel |
position(long newPosition) |
int |
read(java.nio.ByteBuffer dst) |
long |
size() |
java.lang.String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
java.nio.channels.SeekableByteChannel |
truncate(long size) |
int |
write(java.nio.ByteBuffer src) |
@Nullable protected java.nio.channels.SeekableByteChannel delegate
protected DecoratingSeekableByteChannel(@CheckForNull
java.nio.channels.SeekableByteChannel channel)
channel - the seekable byte channel to wrap in this decorator.public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChannelread in interface java.nio.channels.SeekableByteChanneljava.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.SeekableByteChannelwrite in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic long position()
throws java.io.IOException
position in interface java.nio.channels.SeekableByteChanneljava.io.IOExceptionpublic java.nio.channels.SeekableByteChannel position(long newPosition)
throws java.io.IOException
position in interface java.nio.channels.SeekableByteChanneljava.io.IOExceptionpublic long size()
throws java.io.IOException
size in interface java.nio.channels.SeekableByteChanneljava.io.IOExceptionpublic java.nio.channels.SeekableByteChannel truncate(long size)
throws java.io.IOException
truncate in interface java.nio.channels.SeekableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.