com.googlecode.mp4parser.util
Class ByteBufferByteChannel
java.lang.Object
com.googlecode.mp4parser.util.ByteBufferByteChannel
- All Implemented Interfaces:
- Closeable, ByteChannel, Channel, ReadableByteChannel, WritableByteChannel
public class ByteBufferByteChannel
- extends Object
- implements ByteChannel
Creates a ReadableByteChannel
that is backed by a ByteBuffer
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteBufferByteChannel
public ByteBufferByteChannel(ByteBuffer byteBuffer)
read
public int read(ByteBuffer dst)
throws IOException
- Specified by:
read
in interface ReadableByteChannel
- Throws:
IOException
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface Channel
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface Channel
- Throws:
IOException
write
public int write(ByteBuffer src)
throws IOException
- Specified by:
write
in interface WritableByteChannel
- Throws:
IOException
Copyright © 2012. All Rights Reserved.