public class DirectFileReadDataSource
extends java.lang.Object
DataSource implementation that relies on direct reads from a RandomAccessFile.
It should be slower than com.googlecode.mp4parser.FileDataSourceImpl but does not incur the implicit file locks of
memory mapped I/O on some JVMs. This implementation allows for a more controlled deletion of files
and might be preferred when working with temporary files.| Constructor and Description |
|---|
DirectFileReadDataSource(java.io.File f) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.nio.ByteBuffer |
map(long startPosition,
long size) |
long |
position() |
void |
position(long nuPos) |
int |
read(java.nio.ByteBuffer byteBuffer) |
int |
readAllInOnce(java.nio.ByteBuffer byteBuffer) |
long |
size() |
long |
transferTo(long position,
long count,
java.nio.channels.WritableByteChannel target) |
public DirectFileReadDataSource(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic int read(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
java.io.IOExceptionpublic int readAllInOnce(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
java.io.IOExceptionpublic long size()
throws java.io.IOException
java.io.IOExceptionpublic long position()
throws java.io.IOException
java.io.IOExceptionpublic void position(long nuPos)
throws java.io.IOException
java.io.IOExceptionpublic long transferTo(long position,
long count,
java.nio.channels.WritableByteChannel target)
throws java.io.IOException
java.io.IOExceptionpublic java.nio.ByteBuffer map(long startPosition,
long size)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOException"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"