|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jsdp.TimeZone
public class TimeZone
A TimeZone represents a z=<field value> field contained in a SDP message. The timezone field allows the sender to specify a list of adjustment times and offsets from the base time.
| Field Summary | |
|---|---|
protected Hashtable |
adjustments
The map of timezone adjustments |
protected boolean |
isTyped
Indicates if the field will be output as a typed time or a number |
| 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 |
TimeZone()
Creates a new TimeZone. |
|
TimeZone(Date time,
long offset)
Creates a new TimeZone. |
|
TimeZone(ZoneAdjustment adjustment)
Creates a new TimeZone. |
| Method Summary | |
|---|---|
void |
addZoneAdjustment(Date time,
long offset)
Add a zone adjustment to the field. |
void |
addZoneAdjustment(ZoneAdjustment adjustment)
Add a zone adjustment to the field. |
Object |
clone()
Returns a clone of this field. |
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 TimeZone |
parse(String field)
Parse an input string and constructs the equivalent timezone field. |
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 boolean isTyped
protected Hashtable adjustments
| Constructor Detail |
|---|
protected TimeZone()
public TimeZone(Date time,
long offset)
throws SDPException
time - the adjustment timeoffset - the offset
SDPException - if the NTP representation of the adjustment time is
negativepublic TimeZone(ZoneAdjustment adjustment)
adjustment - the time zone adjustment| Method Detail |
|---|
public static TimeZone parse(String field)
throws SDPParseException
field - the string to parse
SDPParseException - if an error occurs while parsing
public void addZoneAdjustment(Date time,
long offset)
throws SDPException
time - the adjustment timeoffset - the offset
SDPException - if the NTP representation of the adjustment time is
negativepublic void addZoneAdjustment(ZoneAdjustment adjustment)
adjustment - the time zone adjustmentpublic Object clone()
clone in interface Fieldclone in class Objectpublic char getType()
getType in interface Fieldpublic 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 setTypedTime(boolean typedTime)
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 String toString()
toString in interface FieldtoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||