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, toStringcheckOpenpublic ReadOnlyChannel()
public ReadOnlyChannel(@WillCloseWhenClosed SeekableByteChannel channel)
public final SeekableByteChannel truncate(long size) throws NonWritableChannelException
truncate in interface SeekableByteChanneltruncate in class DecoratingSeekableChannelNonWritableChannelException - always.public final int write(ByteBuffer src) throws NonWritableChannelException
write in interface SeekableByteChannelwrite in interface WritableByteChannelwrite in class DecoratingSeekableChannelNonWritableChannelException - always.Copyright © 2012–2014 Schlichtherle IT Services. All rights reserved.