@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) |
toString
checkOpen
protected LockSeekableChannel(Lock lock)
public LockSeekableChannel(Lock lock, @WillCloseWhenClosed SeekableByteChannel channel)
@DischargesObligation public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
close
in class DecoratingSeekableChannel
IOException
public boolean isOpen()
isOpen
in interface Channel
isOpen
in class DecoratingSeekableChannel
public long position() throws IOException
position
in interface SeekableByteChannel
position
in class DecoratingSeekableChannel
IOException
public SeekableByteChannel position(long pos) throws IOException
position
in interface SeekableByteChannel
position
in class DecoratingSeekableChannel
IOException
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
read
in interface SeekableByteChannel
read
in class DecoratingSeekableChannel
IOException
public long size() throws IOException
size
in interface SeekableByteChannel
size
in class DecoratingSeekableChannel
IOException
public SeekableByteChannel truncate(long size) throws IOException
truncate
in interface SeekableByteChannel
truncate
in class DecoratingSeekableChannel
IOException
public int write(ByteBuffer src) throws IOException
write
in interface SeekableByteChannel
write
in interface WritableByteChannel
write
in class DecoratingSeekableChannel
IOException
Copyright © 2012–2017 Schlichtherle IT Services. All rights reserved.