Package convex.net
Class MemoryByteChannel
java.lang.Object
convex.net.MemoryByteChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,WritableByteChannel
ByteChannel implementation wrapping a fixed size in-memory buffer
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static MemoryByteChannelcreate(int length) booleanisOpen()intread(ByteBuffer dst) intwrite(ByteBuffer src)
-
Method Details
-
create
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
ClosedChannelException
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-