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

ChunkHeaderReader

public final class ChunkHeaderReader extends Object implements ChunkReader
Default reader, Reads GUID and size out of an input stream and creates a {@link org.jaudiotagger.audio.asf.data.Chunk}object, finally skips the remaining chunk bytes.
author
Christian Laireiter

Fields Summary
private static final org.jaudiotagger.audio.asf.data.GUID[]
APPLYING
The GUID this reader {@linkplain #getApplyingIds() applies to}
private static final ChunkHeaderReader
INSTANCE
Default instance.
Constructors Summary
private ChunkHeaderReader()
Hidden Utility class constructor.

        // Hidden
    
Methods Summary
public booleancanFail()
{@inheritDoc}

        return false;
    
public org.jaudiotagger.audio.asf.data.GUID[]getApplyingIds()
{@inheritDoc}

        return APPLYING.clone();
    
public static org.jaudiotagger.audio.asf.io.ChunkHeaderReadergetInstance()
Returns an instance of the reader.

return
instance.


                  
        
        return INSTANCE;
    
public org.jaudiotagger.audio.asf.data.Chunkread(org.jaudiotagger.audio.asf.data.GUID guid, java.io.InputStream stream, long chunkStart)
{@inheritDoc}

        final BigInteger chunkLen = Utils.readBig64(stream);
        stream.skip(chunkLen.longValue() - 24);
        return new Chunk(guid, chunkStart, chunkLen);