entagged.audioformats.asf.data
Class ContentDescription

java.lang.Object
  extended by entagged.audioformats.asf.data.Chunk
      extended by entagged.audioformats.asf.data.ContentDescription

public class ContentDescription
extends Chunk

This class represents the data of a chunk which contains title, author, copyright, description and the rating of the file.
It is optional whithin asf files. But if exists only once.

Author:
Christian Laireiter

Field Summary
 
Fields inherited from class entagged.audioformats.asf.data.Chunk
chunkLength, guid, position
 
Constructor Summary
ContentDescription()
          Creates an instance.
ContentDescription(long pos, BigInteger chunkLen)
          Creates an instance.
 
Method Summary
 String getAuthor()
           
 byte[] getBytes()
          This method creates a byte array that could directly be written to an asf file.
 String getComment()
           
 String getCopyRight()
           
 String getRating()
           
 String getTitle()
           
 String prettyPrint()
          (overridden)
 void setAuthor(String fileAuthor)
           
 void setComment(String tagComment)
           
 void setCopyRight(String cpright)
           
 void setRating(String ratingText)
           
 void setTitle(String songTitle)
           
 
Methods inherited from class entagged.audioformats.asf.data.Chunk
getChunckEnd, getChunkLength, getGuid, getPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentDescription

public ContentDescription()
Creates an instance.


ContentDescription

public ContentDescription(long pos,
                          BigInteger chunkLen)
Creates an instance.

Parameters:
pos - Position of content description within file or stream
chunkLen - Length of content description.
Method Detail

getAuthor

public String getAuthor()
Returns:
Returns the author.

getBytes

public byte[] getBytes()
This method creates a byte array that could directly be written to an asf file.

Returns:
The asf chunk representation of a content description with the values of the current object.

getComment

public String getComment()
Returns:
Returns the comment.

getCopyRight

public String getCopyRight()
Returns:
Returns the copyRight.

getRating

public String getRating()
Returns:
returns the rating.

getTitle

public String getTitle()
Returns:
Returns the title.

prettyPrint

public String prettyPrint()
(overridden)

Overrides:
prettyPrint in class Chunk
Returns:
Information of current Chunk Object.
See Also:
Chunk.prettyPrint()

setAuthor

public void setAuthor(String fileAuthor)
               throws IllegalArgumentException
Parameters:
fileAuthor - The author to set.
Throws:
IllegalArgumentException - If "UTF-16LE"-byte-representation would take more than 65535 bytes.

setComment

public void setComment(String tagComment)
                throws IllegalArgumentException
Parameters:
tagComment - The comment to set.
Throws:
IllegalArgumentException - If "UTF-16LE"-byte-representation would take more than 65535 bytes.

setCopyRight

public void setCopyRight(String cpright)
                  throws IllegalArgumentException
Parameters:
cpright - The copyRight to set.
Throws:
IllegalArgumentException - If "UTF-16LE"-byte-representation would take more than 65535 bytes.

setRating

public void setRating(String ratingText)
               throws IllegalArgumentException
Parameters:
ratingText - The rating to be set.
Throws:
IllegalArgumentException - If "UTF-16LE"-byte-representation would take more than 65535 bytes.

setTitle

public void setTitle(String songTitle)
              throws IllegalArgumentException
Parameters:
songTitle - The title to set.
Throws:
IllegalArgumentException - If "UTF-16LE"-byte-representation would take more than 65535 bytes.


Copyright © 2007-2008. All Rights Reserved.