org.swhite.daap
Class ContentCodes

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

public class ContentCodes
extends java.lang.Object

Created on Tuesday May 20, 2003

Author:
Steve White

Constructor Summary
ContentCodes()
          Constructs a new ContentCodes.
ContentCodes(byte[] data)
          Constructs a new ContentCodes with the specified daap data.
ContentCodes(java.lang.String hostname)
          Construcs a new ContentCodes with the data from the specified host, with a default port of 3689
ContentCodes(java.lang.String hostname, int port)
          Construcs a new ContentCodes with the data from the specified host and port
ContentCodes(java.net.URL url)
          Constructs a new ContentCodes with the data from the specified URL.
 
Method Summary
 short getContentCodeTypeFor(java.lang.String tag)
          Returns the content code type for the specified daap tag.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentCodes

public ContentCodes()
Constructs a new ContentCodes. A default set of contentcodes is set, and codesresponse and status are set to -1.


ContentCodes

public ContentCodes(byte[] data)
             throws ParserException
Constructs a new ContentCodes with the specified daap data.

Parameters:
data - Raw daap data.

ContentCodes

public ContentCodes(java.net.URL url)
             throws java.io.IOException,
                    ParserException
Constructs a new ContentCodes with the data from the specified URL.

Parameters:
url - URL containing the ContentCodes, e.g. http://localhost:3689/content-codes

ContentCodes

public ContentCodes(java.lang.String hostname,
                    int port)
             throws java.io.IOException,
                    java.net.MalformedURLException,
                    ParserException
Construcs a new ContentCodes with the data from the specified host and port

Parameters:
hostname - The hostname of the daap server
port - The port number that the daap server is listening to (usually 3689)

ContentCodes

public ContentCodes(java.lang.String hostname)
             throws java.io.IOException,
                    java.net.MalformedURLException,
                    ParserException
Construcs a new ContentCodes with the data from the specified host, with a default port of 3689

Parameters:
hostname - The hostname of the daap server
Method Detail

getContentCodeTypeFor

public short getContentCodeTypeFor(java.lang.String tag)
Returns the content code type for the specified daap tag.

Parameters:
tag - The daap tag name (i.e. minm)
Returns:
int

toString

public java.lang.String toString()