FileDocCategorySizeDatePackage
StreamChunk.javaAPI DocJaudiotagger 2.0.45958Wed Mar 30 16:11:50 BST 2011org.jaudiotagger.audio.asf.data

StreamChunk

public abstract class StreamChunk extends Chunk
This class is the base for all handled stream contents.
A Stream chunk delivers information about a audio or video stream. Because of this the stream chunk identifies in one field what type of stream it is describing and so other data is provided. However some information is common to all stream chunks which are stored in this hierarchy of the class tree.
author
Christian Laireiter

Fields Summary
private boolean
contentEncrypted
If true, the stream data is encrypted.
private int
streamNumber
This field stores the number of the current stream.
private long
streamSpecificDataSize
private long
timeOffset
Something technical.
Format time in 100-ns steps.
private final GUID
type
Stores the stream type.
private long
typeSpecificDataSize
Stores the size of type specific data structure within chunk.
Constructors Summary
public StreamChunk(GUID streamType, BigInteger chunkLen)
Creates an instance

param
streamType The GUID which tells the stream type represented ( {@link GUID#GUID_AUDIOSTREAM} or {@link GUID#GUID_VIDEOSTREAM} ):
param
chunkLen length of chunk

        super(GUID.GUID_STREAM, chunkLen);
        assert GUID.GUID_AUDIOSTREAM.equals(streamType)
                || GUID.GUID_VIDEOSTREAM.equals(streamType);
        this.type = streamType;
    
Methods Summary
public intgetStreamNumber()

return
Returns the streamNumber.

        return this.streamNumber;
    
public longgetStreamSpecificDataSize()

return
Returns the streamSpecificDataSize.

        return this.streamSpecificDataSize;
    
public GUIDgetStreamType()
Returns the stream type of the stream chunk.

return
{@link GUID#GUID_AUDIOSTREAM} or {@link GUID#GUID_VIDEOSTREAM}.

        return this.type;
    
public longgetTimeOffset()

return
Returns the timeOffset.

        return this.timeOffset;
    
public longgetTypeSpecificDataSize()

return
Returns the typeSpecificDataSize.

        return this.typeSpecificDataSize;
    
public booleanisContentEncrypted()

return
Returns the contentEncrypted.

        return this.contentEncrypted;
    
public java.lang.StringprettyPrint(java.lang.String prefix)
(overridden)

see
org.jaudiotagger.audio.asf.data.Chunk#prettyPrint(String)

        final StringBuilder result = new StringBuilder(super.prettyPrint(prefix));
        result.append(prefix).append("  |-> Stream number: ").append(
                getStreamNumber()).append(Utils.LINE_SEPARATOR);
        result.append(prefix).append("  |-> Type specific data size  : ")
                .append(getTypeSpecificDataSize()).append(Utils.LINE_SEPARATOR);
        result.append(prefix).append("  |-> Stream specific data size: ")
                .append(getStreamSpecificDataSize()).append(
                        Utils.LINE_SEPARATOR);
        result.append(prefix).append("  |-> Time Offset              : ")
                .append(getTimeOffset()).append(Utils.LINE_SEPARATOR);
        result.append(prefix).append("  |-> Content Encryption       : ")
                .append(isContentEncrypted()).append(Utils.LINE_SEPARATOR);
        return result.toString();
    
public voidsetContentEncrypted(boolean cntEnc)

param
cntEnc The contentEncrypted to set.

        this.contentEncrypted = cntEnc;
    
public voidsetStreamNumber(int streamNum)

param
streamNum The streamNumber to set.

        this.streamNumber = streamNum;
    
public voidsetStreamSpecificDataSize(long strSpecDataSize)

param
strSpecDataSize The streamSpecificDataSize to set.

        this.streamSpecificDataSize = strSpecDataSize;
    
public voidsetTimeOffset(long timeOffs)

param
timeOffs sets the time offset

        this.timeOffset = timeOffs;
    
public voidsetTypeSpecificDataSize(long typeSpecDataSize)

param
typeSpecDataSize The typeSpecificDataSize to set.

        this.typeSpecificDataSize = typeSpecDataSize;