FileDocCategorySizeDatePackage
ChunkReader.javaAPI DocJaudiotagger 2.0.41980Wed Mar 30 16:11:50 BST 2011org.jaudiotagger.audio.asf.io

ChunkReader

public interface ChunkReader
A ChunkReader provides methods for reading an ASF chunk.
author
Christian Laireiter

Fields Summary
Constructors Summary
Methods Summary
public booleancanFail()
Tells whether the reader can fail to return a valid chunk.
The current Use would be a modified version of {@link 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.

return
true, if further analysis of the chunk can show, that the reader is not applicable, despite the header GUID {@linkplain #getApplyingIds() identification} told it can handle the chunk.

public org.jaudiotagger.audio.asf.data.GUID[]getApplyingIds()
Returns the GUIDs identifying the types of chunk, this reader will parse.

return
the GUIDs identifying the types of chunk, this reader will parse.

public org.jaudiotagger.audio.asf.data.Chunkread(org.jaudiotagger.audio.asf.data.GUID guid, java.io.InputStream stream, long streamPosition)
Parses the chunk.

param
guid the GUID of the chunks header, which is about to be read.
param
stream source to read chunk from.
No {@link GUID} is expected at the currents stream position. The length of the chunk is about to follow.
param
streamPosition the position in stream, the chunk starts.
return
the read chunk. (Mostly a subclass of {@link Chunk}).
throws
IOException On I/O Errors.