Package org.mp4parser.tools
Class ByteBufferByteChannel
java.lang.Object
org.mp4parser.tools.ByteBufferByteChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,WritableByteChannel
Creates a
ReadableByteChannel that is backed by a ByteBuffer.-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferByteChannel(byte[] byteArray) ByteBufferByteChannel(ByteBuffer byteBuffer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanisOpen()intread(ByteBuffer dst) intwrite(ByteBuffer src)
-
Constructor Details
-
ByteBufferByteChannel
public ByteBufferByteChannel(byte[] byteArray) -
ByteBufferByteChannel
-
-
Method Details
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
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
-