com.googlecode.mp4parser.util
Class ByteBufferByteChannel

java.lang.Object
  extended by 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.


Constructor Summary
ByteBufferByteChannel(ByteBuffer byteBuffer)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int read(ByteBuffer dst)
           
 int write(ByteBuffer src)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferByteChannel

public ByteBufferByteChannel(ByteBuffer byteBuffer)
Method Detail

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.