org.jaudiotagger.audio.asf.data
Class StreamChunk

java.lang.Object
  extended by org.jaudiotagger.audio.asf.data.Chunk
      extended by org.jaudiotagger.audio.asf.data.StreamChunk
Direct Known Subclasses:
AudioStreamChunk, VideoStreamChunk

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

Field 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.
private  GUID type
          Stores the stream type.
private  long typeSpecificDataSize
          Stores the size of type specific data structure within chunk.
 
Fields inherited from class org.jaudiotagger.audio.asf.data.Chunk
chunkLength, guid, position
 
Constructor Summary
StreamChunk(GUID streamType, java.math.BigInteger chunkLen)
          Creates an instance
 
Method Summary
 int getStreamNumber()
           
 long getStreamSpecificDataSize()
           
 GUID getStreamType()
          Returns the stream type of the stream chunk.
 long getTimeOffset()
           
 long getTypeSpecificDataSize()
           
 boolean isContentEncrypted()
           
 java.lang.String prettyPrint(java.lang.String prefix)
          (overridden)
 void setContentEncrypted(boolean cntEnc)
           
 void setStreamNumber(int streamNum)
           
 void setStreamSpecificDataSize(long strSpecDataSize)
           
 void setTimeOffset(long timeOffs)
           
 void setTypeSpecificDataSize(long typeSpecDataSize)
           
 
Methods inherited from class org.jaudiotagger.audio.asf.data.Chunk
getChunckEnd, getChunkEnd, getChunkLength, getGuid, getPosition, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contentEncrypted

private boolean contentEncrypted
If true, the stream data is encrypted.


streamNumber

private int streamNumber
This field stores the number of the current stream.


streamSpecificDataSize

private long streamSpecificDataSize
See Also:
typeSpecificDataSize

timeOffset

private long timeOffset
Something technical.
Format time in 100-ns steps.


type

private final GUID type
Stores the stream type.

See Also:
GUID.GUID_AUDIOSTREAM, GUID.GUID_VIDEOSTREAM

typeSpecificDataSize

private long typeSpecificDataSize
Stores the size of type specific data structure within chunk.

Constructor Detail

StreamChunk

public StreamChunk(GUID streamType,
                   java.math.BigInteger chunkLen)
Creates an instance

Parameters:
streamType - The GUID which tells the stream type represented ( GUID.GUID_AUDIOSTREAM or GUID.GUID_VIDEOSTREAM ):
chunkLen - length of chunk
Method Detail

getStreamNumber

public int getStreamNumber()
Returns:
Returns the streamNumber.

getStreamSpecificDataSize

public long getStreamSpecificDataSize()
Returns:
Returns the streamSpecificDataSize.

getStreamType

public GUID getStreamType()
Returns the stream type of the stream chunk.

Returns:
GUID.GUID_AUDIOSTREAM or GUID.GUID_VIDEOSTREAM.

getTimeOffset

public long getTimeOffset()
Returns:
Returns the timeOffset.

getTypeSpecificDataSize

public long getTypeSpecificDataSize()
Returns:
Returns the typeSpecificDataSize.

isContentEncrypted

public boolean isContentEncrypted()
Returns:
Returns the contentEncrypted.

prettyPrint

public java.lang.String prettyPrint(java.lang.String prefix)
(overridden)

Overrides:
prettyPrint in class Chunk
Parameters:
prefix - each line gets this string prepended.
Returns:
Information of current Chunk Object.
See Also:
Chunk.prettyPrint(String)

setContentEncrypted

public void setContentEncrypted(boolean cntEnc)
Parameters:
cntEnc - The contentEncrypted to set.

setStreamNumber

public void setStreamNumber(int streamNum)
Parameters:
streamNum - The streamNumber to set.

setStreamSpecificDataSize

public void setStreamSpecificDataSize(long strSpecDataSize)
Parameters:
strSpecDataSize - The streamSpecificDataSize to set.

setTimeOffset

public void setTimeOffset(long timeOffs)
Parameters:
timeOffs - sets the time offset

setTypeSpecificDataSize

public void setTypeSpecificDataSize(long typeSpecDataSize)
Parameters:
typeSpecDataSize - The typeSpecificDataSize to set.