@ThreadSafe public class LockSeekableChannel extends DecoratingSeekableChannel
Lock object.channel| Modifier | Constructor and Description |
|---|---|
protected |
LockSeekableChannel(Lock lock) |
|
LockSeekableChannel(Lock lock,
SeekableByteChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
SeekableByteChannel |
position(long pos) |
int |
read(ByteBuffer dst) |
long |
size() |
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer src) |
toStringcheckOpenprotected LockSeekableChannel(Lock lock)
public LockSeekableChannel(Lock lock, @WillCloseWhenClosed SeekableByteChannel channel)
@DischargesObligation
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in class DecoratingSeekableChannelIOExceptionpublic boolean isOpen()
isOpen in interface ChannelisOpen in class DecoratingSeekableChannelpublic 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 long size()
throws IOException
size in interface SeekableByteChannelsize in class DecoratingSeekableChannelIOExceptionpublic SeekableByteChannel truncate(long size) throws IOException
truncate in interface SeekableByteChanneltruncate in class DecoratingSeekableChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface SeekableByteChannelwrite in interface WritableByteChannelwrite in class DecoratingSeekableChannelIOExceptionCopyright © 2012–2014 Schlichtherle IT Services. All rights reserved.