org.swhite.daap
Class Parser

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

public class Parser
extends java.lang.Object

Parser parses daap packets. Used by virtually every class in this package. Created on Tuesday May 20, 2003

Author:
Steve White

Constructor Summary
Parser()
          Constructs a new daap parser.
 
Method Summary
 java.lang.Object getObjectForKey(java.lang.String key)
          Returns the value for the specified daap tag.
 void parse(byte[] data)
          Parses the specified daap data.
 void setContentCodes(ContentCodes contentCodes)
          Sets the contentCodes
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Constructs a new daap parser. Uses the default set of ContentCodes.

Method Detail

setContentCodes

public void setContentCodes(ContentCodes contentCodes)
Sets the contentCodes

Parameters:
contentCodes - ContentCodes to use during parsing.

parse

public void parse(byte[] data)
           throws ParserException
Parses the specified daap data.

Parameters:
data - Raw daap data
Throws:
ParserException

getObjectForKey

public java.lang.Object getObjectForKey(java.lang.String key)
Returns the value for the specified daap tag.

Parameters:
key - daap tag
Returns:
Object if key is found, null otherwise.

toString

public java.lang.String toString()