org.jaudiotagger.audio.asf.data
Class FileHeader

java.lang.Object
  extended by org.jaudiotagger.audio.asf.data.Chunk
      extended by org.jaudiotagger.audio.asf.data.FileHeader

public class FileHeader
extends Chunk

This class stores the information about the file, which is contained within a special chunk of asf files.

Author:
Christian Laireiter

Constructor Summary
FileHeader(long fileHeaderStart, java.math.BigInteger chunckLen, java.math.BigInteger size, java.math.BigInteger fileTime, java.math.BigInteger pkgCount, java.math.BigInteger dur, java.math.BigInteger timestampStart, java.math.BigInteger timestampEnd, long headerFlags, long minPkgSize, long maxPkgSize, long uncmpVideoFrameSize)
          Creates an instance.
 
Method Summary
 java.math.BigInteger getDuration()
           
 int getDurationInSeconds()
          This method converts getDuration()from 100ns steps to normal seconds.
 java.util.Date getFileCreationTime()
           
 java.math.BigInteger getFileSize()
           
 long getFlags()
           
 long getMaxPackageSize()
           
 long getMinPackageSize()
           
 java.math.BigInteger getPackageCount()
           
 float getPreciseDuration()
          This method converts getDuration() from 100ns steps to normal seconds with a fractional part taking milliseconds.
 java.math.BigInteger getTimeEndPos()
           
 java.math.BigInteger getTimeStartPos()
           
 long getUncompressedFrameSize()
           
 java.lang.String prettyPrint()
          (overridden)
 
Methods inherited from class org.jaudiotagger.audio.asf.data.Chunk
getChunckEnd, getChunkLength, getGuid, getPosition, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileHeader

public FileHeader(long fileHeaderStart,
                  java.math.BigInteger chunckLen,
                  java.math.BigInteger size,
                  java.math.BigInteger fileTime,
                  java.math.BigInteger pkgCount,
                  java.math.BigInteger dur,
                  java.math.BigInteger timestampStart,
                  java.math.BigInteger timestampEnd,
                  long headerFlags,
                  long minPkgSize,
                  long maxPkgSize,
                  long uncmpVideoFrameSize)
Creates an instance.

Parameters:
fileHeaderStart - Position in file or stream, where the file header starts.
chunckLen - Length of the file header (chunk)
size - Size of file or stream
fileTime - Time file or stream was created. Time is calculated since 1st january of 1601 in 100ns steps.
pkgCount - Number of stream packages.
dur - Duration of media clip in 100ns steps
timestampStart - Timestamp of start timeStartPos
timestampEnd - Timestamp of end timeEndPos
headerFlags - some stream related flags.
minPkgSize - minimun size of packages
maxPkgSize - maximum size of packages
uncmpVideoFrameSize - Size of an uncompressed Video Frame.
Method Detail

getDuration

public java.math.BigInteger getDuration()
Returns:
Returns the duration.

getDurationInSeconds

public int getDurationInSeconds()
This method converts getDuration()from 100ns steps to normal seconds.

Returns:
Duration of the media in seconds.

getFileCreationTime

public java.util.Date getFileCreationTime()
Returns:
Returns the fileCreationTime.

getFileSize

public java.math.BigInteger getFileSize()
Returns:
Returns the fileSize.

getFlags

public long getFlags()
Returns:
Returns the flags.

getMaxPackageSize

public long getMaxPackageSize()
Returns:
Returns the maxPackageSize.

getMinPackageSize

public long getMinPackageSize()
Returns:
Returns the minPackageSize.

getPackageCount

public java.math.BigInteger getPackageCount()
Returns:
Returns the packageCount.

getPreciseDuration

public float getPreciseDuration()
This method converts getDuration() from 100ns steps to normal seconds with a fractional part taking milliseconds.

Returns:
The duraion of the media in seconds (with a precision of milliseconds)

getTimeEndPos

public java.math.BigInteger getTimeEndPos()
Returns:
Returns the timeEndPos.

getTimeStartPos

public java.math.BigInteger getTimeStartPos()
Returns:
Returns the timeStartPos.

getUncompressedFrameSize

public long getUncompressedFrameSize()
Returns:
Returns the uncompressedFrameSize.

prettyPrint

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

Overrides:
prettyPrint in class Chunk
Returns:
Information of current Chunk Object.
See Also:
entagged.audioformats.asf.data.Chunk#prettyPrint()