public class ReadOnlyChannel extends DecoratingSeekableChannel
NonWritableChannelException
upon any attempt to modify the decorated
seekable byte channel.
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.
channel
Constructor and Description |
---|
ReadOnlyChannel() |
ReadOnlyChannel(SeekableByteChannel channel) |
Modifier and Type | Method and Description |
---|---|
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer src) |
close, isOpen, position, position, read, size, toString
checkOpen
public ReadOnlyChannel()
public ReadOnlyChannel(@WillCloseWhenClosed SeekableByteChannel channel)
public final SeekableByteChannel truncate(long size) throws NonWritableChannelException
truncate
in interface SeekableByteChannel
truncate
in class DecoratingSeekableChannel
NonWritableChannelException
- always.public final int write(ByteBuffer src) throws NonWritableChannelException
write
in interface SeekableByteChannel
write
in interface WritableByteChannel
write
in class DecoratingSeekableChannel
NonWritableChannelException
- always.Copyright © 2012–2015 Schlichtherle IT Services. All rights reserved.