Package com.emc.mongoose.base.item.io
Class AsyncChannelWrapper
- java.lang.Object
-
- com.emc.mongoose.base.item.io.AsyncChannelWrapper
-
- All Implemented Interfaces:
AsyncChannel,java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.AsynchronousChannel,java.nio.channels.Channel
public final class AsyncChannelWrapper extends java.lang.Object implements AsyncChannel
-
-
Constructor Summary
Constructors Constructor Description AsyncChannelWrapper(java.nio.channels.AsynchronousChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisFileChannel()booleanisOpen()<A> voidread(java.nio.ByteBuffer dst, long position, A attach, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)java.nio.channels.AsynchronousChannelwrapped()<A> voidwrite(java.nio.ByteBuffer src, long position, A attach, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)
-
-
-
Method Detail
-
isFileChannel
public final boolean isFileChannel()
- Specified by:
isFileChannelin interfaceAsyncChannel
-
wrapped
public final java.nio.channels.AsynchronousChannel wrapped()
- Specified by:
wrappedin interfaceAsyncChannel
-
read
public final <A> void read(java.nio.ByteBuffer dst, long position, A attach, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)- Specified by:
readin interfaceAsyncChannel
-
write
public final <A> void write(java.nio.ByteBuffer src, long position, A attach, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)- Specified by:
writein interfaceAsyncChannel
-
isOpen
public final boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
close
public final void close() throws java.io.IOException- Specified by:
closein interfacejava.nio.channels.AsynchronousChannel- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-