|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jsdp.RepeatTime
public class RepeatTime
A RepeatTime represents a r=<field value>
field contained in a SDP message. A repeat time field specify repeat times
for a session: his consists of a repeat interval, an active
duration and a list of offsets relative to the
Time.getStartTime()
start time.
Time
,
Serialized FormField Summary | |
---|---|
protected long |
activeDuration
The active duraction |
protected boolean |
isTyped
Indicates if the field will be output as a typed time or a number |
protected Vector |
offsets
The list of offset relative to the t field start time |
protected long |
repeatInterval
The repeat interval |
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 |
RepeatTime()
Creates a new RepeatTime. |
|
RepeatTime(long repeatInterval,
long activeDuration,
long offset)
Creates a new RepeatTime. |
|
RepeatTime(long repeatInterval,
long activeDuration,
long[] offsets)
Creates a new RepeatTime. |
Method Summary | |
---|---|
void |
addOffset(long offset)
Adds an offset to the field. |
Object |
clone()
Returns a clone of this field. |
long |
getActiveDuration()
Returns the active duration in seconds |
long[] |
getOffsets()
Returns the list of offsets. |
long |
getRepeatInterval()
Returns the repeat interval. |
char |
getType()
Returns the type character for the field. |
boolean |
isTypedTime()
Returns whether the field will be output as a typed time or a number. |
static RepeatTime |
parse(String field)
Parse an input string and constructs the equivalent repeat time field. |
void |
setActiveDuration(long activeDuration)
Sets the active duration. |
void |
setOffset(long[] offsets)
Set the list of offsets. |
void |
setRepeatInterval(long repeatInterval)
Sets the repeat interval. |
void |
setTypedTime(boolean typedTime)
Sets whether the field will be output as a typed time or a number. |
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 long repeatInterval
protected long activeDuration
protected Vector offsets
protected boolean isTyped
Constructor Detail |
---|
protected RepeatTime()
public RepeatTime(long repeatInterval, long activeDuration, long offset) throws SDPException
repeatInterval
- the repeat intervalactiveDuration
- the active durationoffset
- the offset
SDPException
- if the parameters are not validpublic RepeatTime(long repeatInterval, long activeDuration, long[] offsets) throws SDPException
repeatInterval
- the repeat intervalactiveDuration
- the active durationoffsets
- the offsets
SDPException
- if the parameters are not validMethod Detail |
---|
public static RepeatTime parse(String field) throws SDPParseException
field
- the string to parse
SDPParseException
- if an error occurs while parsingpublic void addOffset(long offset) throws SDPException
offset
- the offset value
SDPException
- if the offset value is negativepublic Object clone()
clone
in interface Field
clone
in class Object
public long getActiveDuration()
public long[] getOffsets()
Time
field with which this RepeatTime is
associated.
public long getRepeatInterval()
public char getType()
getType
in interface Field
public boolean isTypedTime()
Typed time is formatted as an number followed by a unit character: the unit indicates an appropriate multiplier for the number. The following unit types are allowed:
public void setActiveDuration(long activeDuration) throws SDPException
activeDuration
- the active duration in seconds
SDPException
- if the active duration is negativepublic void setOffset(long[] offsets) throws SDPException
Time
field with which this RepeatTime is
associated.
offsets
- an array of repeat time offsets
SDPException
- if one or more offset is negativepublic void setRepeatInterval(long repeatInterval) throws SDPException
repeatInterval
- the repeat interval in seconds
SDPException
- if repeatInterval is negativepublic void setTypedTime(boolean typedTime)
public 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 |