|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jsdp.Bandwith
public class Bandwith
A Bandwith represents an b=<field value> field contained in a SDP message.
A bandwith field specifies the proposed bandwidth to be used by the session
or media, and is optional. Multiple bandwidth specifiers of different types
may be associated with the same SessionDescription
. Each has the
form b=<modifier>:<value>. There are
four bandwith modifers (or types):
Field Summary | |
---|---|
static String |
AS
The AS modifier |
static String |
CT
The CT modifier |
protected String |
modifier
The bandwith modifier |
static String |
RR
The RR modifier |
static String |
RS
The RS modifier |
protected int |
value
The bandwith value, in kbits/second |
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 |
Bandwith()
Creates a new Bandwith. |
|
Bandwith(String modifier,
int value)
Creates a new Bandwith. |
Method Summary | |
---|---|
Object |
clone()
Returns a clone of this field. |
String |
getModifier()
Returns the bandwith modifier. |
char |
getType()
Returns the type character for the field. |
int |
getValue()
Returns the bandwith value. |
static Bandwith |
parse(String field)
Parse an input string and constructs the equivalent bandwith field. |
void |
setModifier(String modifier)
Sets the bandwith modifier. |
void |
setValue(int value)
Sets the bandwith value. |
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 |
---|
public static final String AS
public static final String CT
public static final String RS
public static final String RR
protected String modifier
protected int value
Constructor Detail |
---|
protected Bandwith()
public Bandwith(String modifier, int value) throws SDPException
modifier
- the bandwith modifiervalue
- the bandwith value in kbits/second
SDPException
- if the modifier is unknown, or the value is negativeMethod Detail |
---|
public static Bandwith parse(String field) throws SDPParseException
field
- the string to parse
SDPParseException
- if an error occurs while parsingpublic Object clone()
clone
in interface Field
clone
in class Object
public String getModifier()
public char getType()
getType
in interface Field
public int getValue()
public void setModifier(String modifier) throws SDPException
modifier
- the modifier to set
SDPException
- if the modifier is unknownpublic void setValue(int value) throws SDPException
value
- the value to set
SDPException
- if value is negativepublic 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 |