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 TypeMethodDescriptionvoid
close()
static MemoryByteChannel
create
(int length) boolean
isOpen()
int
read
(ByteBuffer dst) int
write
(ByteBuffer src)
-
Method Details
-
create
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
ClosedChannelException
-
isOpen
-
close
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-