Module methanol.testing
Class ForwardingAsynchronousFileChannel
java.lang.Object
java.nio.channels.AsynchronousFileChannel
com.github.mizosoft.methanol.testing.file.ForwardingAsynchronousFileChannel
- All Implemented Interfaces:
ForwardingObject<AsynchronousFileChannel>
,Closeable
,AutoCloseable
,AsynchronousChannel
,Channel
public class ForwardingAsynchronousFileChannel
extends AsynchronousFileChannel
implements ForwardingObject<AsynchronousFileChannel>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
delegate()
void
force
(boolean metaData) boolean
isOpen()
lock
(long position, long size, boolean shared) <A> void
lock
(long position, long size, boolean shared, A attachment, CompletionHandler<FileLock, ? super A> handler) read
(ByteBuffer dst, long position) <A> void
read
(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer, ? super A> handler) long
size()
truncate
(long size) tryLock
(long position, long size, boolean shared) write
(ByteBuffer src, long position) <A> void
write
(ByteBuffer src, long position, A attachment, CompletionHandler<Integer, ? super A> handler)
-
Constructor Details
-
ForwardingAsynchronousFileChannel
-
-
Method Details
-
delegate
- Specified by:
delegate
in interfaceForwardingObject<AsynchronousFileChannel>
-
size
- Specified by:
size
in classAsynchronousFileChannel
- Throws:
IOException
-
truncate
- Specified by:
truncate
in classAsynchronousFileChannel
- Throws:
IOException
-
force
- Specified by:
force
in classAsynchronousFileChannel
- Throws:
IOException
-
lock
public <A> void lock(long position, long size, boolean shared, A attachment, CompletionHandler<FileLock, ? super A> handler) - Specified by:
lock
in classAsynchronousFileChannel
-
lock
- Specified by:
lock
in classAsynchronousFileChannel
-
tryLock
- Specified by:
tryLock
in classAsynchronousFileChannel
- Throws:
IOException
-
read
public <A> void read(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer, ? super A> handler) - Specified by:
read
in classAsynchronousFileChannel
-
read
- Specified by:
read
in classAsynchronousFileChannel
-
write
public <A> void write(ByteBuffer src, long position, A attachment, CompletionHandler<Integer, ? super A> handler) - Specified by:
write
in classAsynchronousFileChannel
-
write
- Specified by:
write
in classAsynchronousFileChannel
-
close
- Specified by:
close
in interfaceAsynchronousChannel
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
isOpen
public boolean isOpen()
-