|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jsdp.Attribute
public class Attribute
An Attribute represents an a=<field value> field contained in a SDP message. Attribute fields may be of two forms:
Obviously attribute field interpretation depends on the media tool being invoked.
Field Summary | |
---|---|
protected String |
name
The attribute property name |
protected String |
value
The attribute value |
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 |
Attribute()
Creates a new Attribute. |
|
Attribute(String name)
Creates a new Attribute. |
|
Attribute(String name,
String value)
Creates a new Attribute. |
Method Summary | |
---|---|
Object |
clone()
Returns a clone of this field. |
String |
getName()
Returns the name of the attribute. |
char |
getType()
Returns the type character for the field. |
String |
getValue()
Returns the value of the attribute. |
boolean |
hasValue()
Determines if this attribute has an associated value. |
static Attribute |
parse(String field)
Parse an input string and constructs the equivalent attribute field. |
void |
resetValue()
Resets the attribute value. |
void |
setName(String name)
Sets the name of the attribute. |
void |
setValue(String value)
Sets the value of this attribute. |
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 |
Field Detail |
---|
protected String name
protected String value
Constructor Detail |
---|
protected Attribute()
public Attribute(String name) throws SDPException
name
- the attribute name
SDPException
- if the name is null or not validpublic Attribute(String name, String value) throws SDPException
name
- the attribute namevalue
- the attribute value
SDPException
- if the name is null or not valid, or the
value is not validMethod Detail |
---|
public static Attribute parse(String field) throws SDPParseException
field
- the string to parse
SDPParseException
- if an error occurs while parsingpublic Object clone()
Field
clone
in interface Field
clone
in class Object
public String getName()
public char getType()
getType
in interface Field
public String getValue()
public boolean hasValue()
public void resetValue()
public void setName(String name) throws SDPException
name
- the name/id of the attribute
SDPException
- if the name is null or not validpublic void setValue(String value) throws SDPException
value
- the attribute value
SDPException
- if the specified value is not validpublic String toString()
toString
in interface Field
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |