|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.audio.asf.io.ChunkContainerReader<AsfExtendedHeader> org.jaudiotagger.audio.asf.io.AsfExtHeaderReader
public class AsfExtHeaderReader
This reader reads an ASF header extension object from an InputStream
and creates an AsfExtendedHeader
object.
Field Summary | |
---|---|
private static GUID[] |
APPLYING
The GUID this reader applies to |
Fields inherited from class org.jaudiotagger.audio.asf.io.ChunkContainerReader |
---|
eachChunkOnce, hasFailingReaders, LOGGER, READ_LIMIT, readerMap |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.jaudiotagger.audio.asf.io.ChunkContainerReader |
---|
checkStream, getReader, isReaderAvailable, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final GUID[] APPLYING
Constructor Detail |
---|
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.Method Detail |
---|
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |