org.swhite.daap
Class ContentCode

java.lang.Object
  extended byorg.swhite.daap.ContentCode

public class ContentCode
extends java.lang.Object

ContentCode gives a descriptive name, a shorthand daap name, and the type used for parsing. This informationall generally comes bundled in the response for /content-codes on a daap server. Created on Tuesday May 20, 2003

Author:
Steve White

Constructor Summary
ContentCode(byte[] data)
          Constructor for ContentCode.
ContentCode(java.lang.String contentcodenumber, java.lang.String contentcodename, short contentcodetype)
          Constructor for ContentCode.
 
Method Summary
 java.lang.String getContentCodeName()
          Returns the descriptive name of the content code (daap tag mcna)
 java.lang.String getContentCodeNumber()
          Returns the daap tag for the content code (daap tag mcnm)
 short getContentCodeType()
          Returns the type of the content code (daap tag mcty)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentCode

public ContentCode(byte[] data)
            throws ParserException
Constructor for ContentCode.

Parameters:
data - Raw daap data

ContentCode

public ContentCode(java.lang.String contentcodenumber,
                   java.lang.String contentcodename,
                   short contentcodetype)
Constructor for ContentCode.

Parameters:
contentcodenumber - The daap tag name of this content code
contentcodename - Descriptive name of this content code
contentcodetype - Content Code Type
Method Detail

getContentCodeNumber

public java.lang.String getContentCodeNumber()
Returns the daap tag for the content code (daap tag mcnm)

Returns:
the daap tag (e.g. "minm")

getContentCodeName

public java.lang.String getContentCodeName()
Returns the descriptive name of the content code (daap tag mcna)

Returns:
the descriptive name of the daap tag (e.g. "dmap.itemname")

getContentCodeType

public short getContentCodeType()
Returns the type of the content code (daap tag mcty)

Returns:
1=Boolean, 3=Integer, 5=Integer, 10=Date (Epoch Timestamp), 7=Hex String, 11=Version, 9=String, 12=Integer

toString

public java.lang.String toString()