public class AsfExtHeaderReader extends ChunkContainerReader<AsfExtendedHeader>
InputStream
and creates an AsfExtendedHeader
object.Modifier and Type | Field and Description |
---|---|
private static GUID[] |
APPLYING
The GUID this reader applies to
|
eachChunkOnce, hasFailingReaders, LOGGER, READ_LIMIT, readerMap
Constructor and Description |
---|
AsfExtHeaderReader(java.util.List<java.lang.Class<? extends ChunkReader>> toRegister,
boolean readChunkOnce)
Creates a reader instance, which only utilizes the given list of chunk
readers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canFail()
Tells whether the reader can fail to return a valid chunk.
The current Use would be a modified version of StreamChunkReader ,
which is configured to only manage audio streams. |
protected AsfExtendedHeader |
createContainer(long streamPosition,
java.math.BigInteger chunkLength,
java.io.InputStream stream)
This method is called by
ChunkContainerReader.read(GUID, InputStream, long) in order
to create the resulting object. |
GUID[] |
getApplyingIds()
Returns the GUIDs identifying the types of chunk, this reader will parse.
|
checkStream, getReader, isReaderAvailable, read
private static final GUID[] APPLYING
public AsfExtHeaderReader(java.util.List<java.lang.Class<? extends ChunkReader>> toRegister, boolean readChunkOnce)
toRegister
- List of ChunkReader
class instances, which are to be
utilized by the instance.readChunkOnce
- if true
, each chunk type (identified by chunk
GUID) will handled only once, if a reader is available, other
chunks will be discarded.public boolean canFail()
StreamChunkReader
,
which is configured to only manage audio streams. However, the primary
GUID for audio and video streams is the same. So if a stream shows itself
to be a video stream, the reader would return null
.true
, if further analysis of the chunk can show,
that the reader is not applicable, despite the header GUID
identification told it can handle
the chunk.protected AsfExtendedHeader createContainer(long streamPosition, java.math.BigInteger chunkLength, java.io.InputStream stream) throws java.io.IOException
ChunkContainerReader.read(GUID, InputStream, long)
in order
to create the resulting object. Implementations of this class should now
return a new instance of their implementation specific result AND
all data should be read, until the list of chunks starts. (The
Chunk.getChunkEnd()
must return a sane result, too)createContainer
in class ChunkContainerReader<AsfExtendedHeader>
streamPosition
- position of the stream, the chunk starts.chunkLength
- the length of the chunk (from chunk header)stream
- to read the implementation specific information.java.io.IOException
- On I/O Errors and Invalid data.public GUID[] getApplyingIds()
Copyright © 2005-2013 java.net. All Rights Reserved.