Package org.mp4parser
Class RewindableReadableByteChannel
- java.lang.Object
-
- org.mp4parser.RewindableReadableByteChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel
public class RewindableReadableByteChannel extends Object implements ReadableByteChannel
Provides rewind() operation to ReadableByteChannel by buffering data up to specified capacity.
-
-
Constructor Summary
Constructors Constructor Description RewindableReadableByteChannel(ReadableByteChannel readableByteChannel, int bufferCapacity)
-
-
-
Constructor Detail
-
RewindableReadableByteChannel
public RewindableReadableByteChannel(ReadableByteChannel readableByteChannel, int bufferCapacity)
-
-
Method Detail
-
read
public int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException- See Also:
ReadableByteChannel.read(ByteBuffer)
-
rewind
public void rewind()
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfaceChannel- See Also:
Channel.isOpen()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException- See Also:
Channel.close()
-
-