de.vdheide.mp3
Class TagContent

java.lang.Object
  extended byde.vdheide.mp3.TagContent

public class TagContent
extends java.lang.Object

An instance of this class contains the content read from a ID3(v2) tag. This class is designed to be as flexible as possible to reduce the number of cases where information has to be returned as binary when it is rather more structured.

It provides storage for - a type (e.g. a MIME-type or a language, Text) - a subtype (text or binary) - a description (text) - the content (text or binary)

Unused fields should be set to null.


Constructor Summary
TagContent()
          Create a new instance with all fields set to null.
 
Method Summary
 byte[] getBinaryContent()
          Get content
 byte[] getBinarySubtype()
          Get subtype
 java.lang.String getDescription()
          Get description
 java.lang.String getTextContent()
          Get content
 java.lang.String getTextSubtype()
          Get subtype
 java.lang.String getType()
           
 void setContent(byte[] content)
          Set content field with binary data
 void setContent(java.lang.String content)
          Set content field with textual data
 void setDescription(java.lang.String desc)
          Set description field
 void setSubtype(byte[] subtype)
          Set subtype field with binary data
 void setSubtype(java.lang.String subtype)
          Set subtype field with textual data
 void setType(java.lang.String type)
          Set type field
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagContent

public TagContent()
Create a new instance with all fields set to null.

Method Detail

setType

public void setType(java.lang.String type)
Set type field

Parameters:
type - Type to set

getType

public java.lang.String getType()
Returns:
Type of tag

setSubtype

public void setSubtype(java.lang.String subtype)
Set subtype field with textual data

Parameters:
subtype - Subtype to set

setSubtype

public void setSubtype(byte[] subtype)
Set subtype field with binary data

Parameters:
subtype - Subtype to set

getTextSubtype

public java.lang.String getTextSubtype()
Get subtype

Returns:
Textual subtype

getBinarySubtype

public byte[] getBinarySubtype()
Get subtype

Returns:
Binary subtype

setDescription

public void setDescription(java.lang.String desc)
Set description field

Parameters:
desc - Description to set

getDescription

public java.lang.String getDescription()
Get description

Returns:
Description

setContent

public void setContent(java.lang.String content)
Set content field with textual data

Parameters:
content - Content to set

setContent

public void setContent(byte[] content)
Set content field with binary data

Parameters:
content - Content to set

getTextContent

public java.lang.String getTextContent()
Get content

Returns:
Textual content

getBinaryContent

public byte[] getBinaryContent()
Get content

Returns:
Binary content