net.sourceforge.jsdp
Class Information

java.lang.Object
  extended by net.sourceforge.jsdp.Information
All Implemented Interfaces:
Serializable, Cloneable, Field

public class Information
extends Object
implements Field

An Information represents an i=<field value> field contained in a SDP message. This field is information about the session and may be omitted, although this is discouraged for session announcements, and user interfaces for composing sessions should require text to be entered.

Since:
0.1.0
Version:
1.0
Author:
Claudio Di Vita
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.sourceforge.jsdp.Field
ATTRIBUTE_FIELD, BANDWITH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, END_OF_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, REPEAT_TIME_FIELD, SESSION_NAME_FIELD, TIME_FIELD, TIMEZONE_FIELD, URI_FIELD, VERSION_FIELD
 
Constructor Summary
protected Information()
          Creates a new Information.
  Information(String value)
          Creates a new Information.
 
Method Summary
 Object clone()
          Returns a clone of this field.
 char getType()
          Returns the type character for the field.
 String getValue()
          Returns the information about the session.
static Information parse(String field)
          Parse an input string and constructs the equivalent information field.
 void setValue(String value)
          Sets the session information.
 String toString()
          Returns a string representation of the field.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Information

protected Information()
Creates a new Information.


Information

public Information(String value)
            throws SDPException
Creates a new Information.

Parameters:
value - the information about the session
Throws:
SDPException - if the characters of the information are not allowed
Method Detail

parse

public static Information parse(String field)
                         throws SDPParseException
Parse an input string and constructs the equivalent information field.

Parameters:
field - the string to parse
Returns:
a new Information instance
Throws:
SDPParseException - if an error occurs while parsing

clone

public Object clone()
Returns a clone of this field.

Specified by:
clone in interface Field
Overrides:
clone in class Object
Returns:
a clone of this field

getType

public char getType()
Returns the type character for the field.

Specified by:
getType in interface Field
Returns:
the field type character: i

getValue

public String getValue()
Returns the information about the session.

Returns:
the session information

setValue

public void setValue(String value)
              throws SDPException
Sets the session information.

Parameters:
value - the information about the session
Throws:
SDPException - if the characters of the information are not allowed

toString

public String toString()
Returns a string representation of the field. The representation has the form: i=<value>

Specified by:
toString in interface Field
Overrides:
toString in class Object
Returns:
the string representation of the field


Copyright © 2004-2008. All Rights Reserved.