@NotThreadSafe public class BufferedReadOnlyChannel extends ReadOnlyChannel
channel| Constructor and Description |
|---|
BufferedReadOnlyChannel(SeekableByteChannel channel)
Constructs a new buffered read-only channel.
|
BufferedReadOnlyChannel(SeekableByteChannel channel,
int bufferSize)
Constructs a new buffered read-only channel.
|
| Modifier and Type | Method and Description |
|---|---|
long |
position() |
SeekableByteChannel |
position(long pos) |
int |
read(ByteBuffer dst) |
BufferedReadOnlyChannel |
sync()
Notifies this channel of concurrent changes in its decorated channel.
|
truncate, writeclose, isOpen, size, toStringcheckOpen@CreatesObligation public BufferedReadOnlyChannel(@WillCloseWhenClosed SeekableByteChannel channel)
channel - the channel to decorate.@CreatesObligation public BufferedReadOnlyChannel(@WillCloseWhenClosed SeekableByteChannel channel, int bufferSize)
channel - the channel to decorate.bufferSize - the size of the byte buffer.public long position()
throws IOException
position in interface SeekableByteChannelposition in class DecoratingSeekableChannelIOExceptionpublic SeekableByteChannel position(long pos) throws IOException
position in interface SeekableByteChannelposition in class DecoratingSeekableChannelIOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in interface SeekableByteChannelread in class DecoratingSeekableChannelIOExceptionpublic BufferedReadOnlyChannel sync()
thisCopyright © 2012–2014 Schlichtherle IT Services. All rights reserved.