public class MXFStream extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MXFStream.KeyAndConsumed |
static class |
MXFStream.LengthAndConsumed |
| Constructor and Description |
|---|
MXFStream() |
| Modifier and Type | Method and Description |
|---|---|
static MXFStream.LengthAndConsumed |
readBERLength(InputStream stream) |
static CPSystemItem |
readCPSystemItem(InputStream stream) |
static EssenceElement |
readEssenceElement(InputStream stream) |
static int |
readEssenceElementWithBytesRead(InputStream stream,
byte[] elementData) |
static int |
readEssenceElementWithTrackID(InputStream stream,
byte[] elementData) |
static HeaderMetadata |
readFooterHeaderMetadata(InputStream inputStream,
int pag) |
static HeaderMetadata |
readFooterHeaderMetadata(InputStream inputStream,
long footerPartitionOffset) |
static HeaderMetadata |
readHeaderMetadata(InputStream stream,
long headerSize) |
static IndexTableSegment |
readIndexTableSegment(InputStream stream) |
static MXFStream.KeyAndConsumed |
readKey(InputStream stream) |
static MXFUnit |
readNextUnit(InputStream stream,
long sizeLimit) |
static PartitionPack |
readPartitionPack(InputStream stream) |
static long |
readPastFill(InputStream stream) |
static RandomIndexPack |
readRandomIndexPack(InputStream stream) |
static RandomIndexPack |
readRandomIndexPack(InputStream stream,
long size)
Read a random index pack (RIP) from the given input stream, using the
given size to efficiently skip to the end of the file to find the RIP.
|
static UL |
readSingleKey(InputStream stream) |
static ByteBuffer |
readValue(InputStream stream,
long size) |
static long |
skipForward(InputStream sourceStream,
long bytesToSkip) |
static void |
writeBERLength(OutputStream stream,
long length,
int encodedBytes) |
static void |
writeEssenceElement(OutputStream stream,
int essenceTrackID,
byte[] elementData) |
static void |
writeEssenceElement(OutputStream stream,
int essenceTrackID,
byte[] elementData,
int offset,
int length) |
static void |
writeFill(OutputStream stream,
long totalLength) |
static void |
writeHeaderMetadata(OutputStream stream,
Preface preface) |
static void |
writeIndexTableSegment(OutputStream stream,
IndexTableSegment indexTableSegment) |
static void |
writeKey(OutputStream stream,
UL key) |
static void |
writePartitionPack(OutputStream stream,
PartitionPack pack) |
static void |
writeRandomIndexPack(OutputStream stream,
RandomIndexPack rip) |
static void |
writeValue(OutputStream stream,
ByteBuffer buffer) |
public static final MXFUnit readNextUnit(InputStream stream, long sizeLimit) throws IOException
IOExceptionpublic static final RandomIndexPack readRandomIndexPack(InputStream stream, long size) throws IOException
Read a random index pack (RIP) from the given input stream, using the given size to efficiently skip to the end of the file to find the RIP. As the RIP is always located at the end of the file, the input stream is always closed following this operation.
stream - Stream of MXF data to read and retrieve the RIP from.size - Total size of the input stream measured in bytes, which must be known in advance of a call to this method.IOException - Problem occurred when reading the file or no RIP is contained within the file.public static final HeaderMetadata readHeaderMetadata(InputStream stream, long headerSize) throws IOException
IOExceptionpublic static final PartitionPack readPartitionPack(InputStream stream) throws IOException
IOExceptionpublic static final EssenceElement readEssenceElement(InputStream stream) throws IOException
IOExceptionpublic static final int readEssenceElementWithTrackID(InputStream stream, byte[] elementData) throws IOException
IOExceptionpublic static final int readEssenceElementWithBytesRead(InputStream stream, byte[] elementData) throws IOException
IOExceptionpublic static final void writeEssenceElement(OutputStream stream, int essenceTrackID, byte[] elementData) throws IOException
IOExceptionpublic static final void writeEssenceElement(OutputStream stream, int essenceTrackID, byte[] elementData, int offset, int length) throws IOException
IOExceptionpublic static final CPSystemItem readCPSystemItem(InputStream stream) throws IOException
IOExceptionpublic static final IndexTableSegment readIndexTableSegment(InputStream stream) throws IOException
IOExceptionpublic static final RandomIndexPack readRandomIndexPack(InputStream stream) throws IOException
IOExceptionpublic static final HeaderMetadata readFooterHeaderMetadata(InputStream inputStream, int pag) throws IOException
IOExceptionpublic static final HeaderMetadata readFooterHeaderMetadata(InputStream inputStream, long footerPartitionOffset) throws IOException
IOExceptionpublic static final void writePartitionPack(OutputStream stream, PartitionPack pack) throws IOException
IOExceptionpublic static final void writeHeaderMetadata(OutputStream stream, Preface preface) throws IOException
IOExceptionpublic static final void writeIndexTableSegment(OutputStream stream, IndexTableSegment indexTableSegment) throws IOException
IOExceptionpublic static final void writeRandomIndexPack(OutputStream stream, RandomIndexPack rip) throws IOException
IOExceptionpublic static final MXFStream.KeyAndConsumed readKey(InputStream stream) throws IOException
IOExceptionpublic static final UL readSingleKey(InputStream stream) throws IOException
IOExceptionpublic static final MXFStream.LengthAndConsumed readBERLength(InputStream stream) throws IOException
IOExceptionpublic static final ByteBuffer readValue(InputStream stream, long size) throws IOException
IOExceptionpublic static final void writeKey(OutputStream stream, UL key) throws IOException
IOExceptionpublic static final void writeBERLength(OutputStream stream, long length, int encodedBytes) throws IOException
IOExceptionpublic static final void writeValue(OutputStream stream, ByteBuffer buffer) throws IOException
IOExceptionpublic static final void writeFill(OutputStream stream, long totalLength) throws IOException
IOExceptionpublic static final long readPastFill(InputStream stream) throws IOException
IOExceptionpublic static final long skipForward(InputStream sourceStream, long bytesToSkip) throws IOException
IOException(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.