gov.nist.javax.sip.header
クラス SIPDate

java.lang.Object
  上位を拡張 gov.nist.javax.sip.header.SIPDate

public class SIPDate
extends java.lang.Object

Implements a parser class for tracking expiration time when specified as a Date value.

 From the HTTP 1.1 spec
14.18 Date

   The Date general-header field represents the date and time at which
   the message was originated, having the same semantics as orig-date in
   RFC 822. The field value is an HTTP-date, as described in section
   3.3.1; it MUST be sent in RFC 1123 [8]-date format.

       Date  = "Date" ":" HTTP-date

   An example is

       Date: Tue, 15 Nov 1994 08:12:31 GMT

バージョン:
JAIN-SIP-1.1 $Revision: 1.4 $ $Date: 2004/07/28 14:41:53 $
作成者:
M. Ranganathan
This code is in the public domain.

フィールドの概要
static java.lang.String APR
           
static java.lang.String AUG
           
static java.lang.String DEC
           
static java.lang.String FEB
           
static java.lang.String FRI
           
static java.lang.String GMT
           
static java.lang.String JAN
           
static java.lang.String JUL
           
static java.lang.String JUN
           
static java.lang.String MAR
           
static java.lang.String MAY
           
static java.lang.String MON
           
static java.lang.String NOV
           
static java.lang.String OCT
           
static java.lang.String SAT
           
static java.lang.String SEP
           
static java.lang.String SUN
           
static java.lang.String THU
           
static java.lang.String TUE
           
static java.lang.String WED
           
 
コンストラクタの概要
SIPDate()
          Initializer, sets all the fields to invalid values.
SIPDate(long timeMillis)
          Construct a SIP date from the time offset given in miliseconds
 
メソッドの概要
 java.lang.String encode()
          Get canonical string representation.
 boolean equals(java.lang.Object that)
          equality check.
 int getDeltaSeconds()
          Get the time offset from the current time.
 int getHour()
          get the hour
 java.util.Calendar getJavaCal()
          The only accessor we allow is to the java calendar record.
 int getMinute()
          get the minute
 java.lang.String getMonth()
          get the month
 int getSecond()
          get the second
 java.lang.String getWkday()
          get the WkDay field
 int getYear()
          Get the year member.
 void setDay(int d)
          Set the day member
 void setHour(int h)
          Set the hour member
 void setMinute(int m)
          Set the minute member
 void setMonth(java.lang.String m)
          Set the month member
 void setSecond(int s)
          Set the second member
 void setWkday(java.lang.String w)
          Set the wkday member
 void setYear(int y)
          Set the year member
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

GMT

public static final java.lang.String GMT
関連項目:
定数フィールド値

MON

public static final java.lang.String MON
関連項目:
定数フィールド値

TUE

public static final java.lang.String TUE
関連項目:
定数フィールド値

WED

public static final java.lang.String WED
関連項目:
定数フィールド値

THU

public static final java.lang.String THU
関連項目:
定数フィールド値

FRI

public static final java.lang.String FRI
関連項目:
定数フィールド値

SAT

public static final java.lang.String SAT
関連項目:
定数フィールド値

SUN

public static final java.lang.String SUN
関連項目:
定数フィールド値

JAN

public static final java.lang.String JAN
関連項目:
定数フィールド値

FEB

public static final java.lang.String FEB
関連項目:
定数フィールド値

MAR

public static final java.lang.String MAR
関連項目:
定数フィールド値

APR

public static final java.lang.String APR
関連項目:
定数フィールド値

MAY

public static final java.lang.String MAY
関連項目:
定数フィールド値

JUN

public static final java.lang.String JUN
関連項目:
定数フィールド値

JUL

public static final java.lang.String JUL
関連項目:
定数フィールド値

AUG

public static final java.lang.String AUG
関連項目:
定数フィールド値

SEP

public static final java.lang.String SEP
関連項目:
定数フィールド値

OCT

public static final java.lang.String OCT
関連項目:
定数フィールド値

NOV

public static final java.lang.String NOV
関連項目:
定数フィールド値

DEC

public static final java.lang.String DEC
関連項目:
定数フィールド値
コンストラクタの詳細

SIPDate

public SIPDate()
Initializer, sets all the fields to invalid values.


SIPDate

public SIPDate(long timeMillis)
Construct a SIP date from the time offset given in miliseconds

パラメータ:
timeMillis - long to set
メソッドの詳細

equals

public boolean equals(java.lang.Object that)
equality check.

オーバーライド:
クラス java.lang.Object 内の equals
戻り値:
true if the two date fields are equals

encode

public java.lang.String encode()
Get canonical string representation.

戻り値:
String

getJavaCal

public java.util.Calendar getJavaCal()
The only accessor we allow is to the java calendar record. All other fields are for this package only.

戻り値:
Calendar

getWkday

public java.lang.String getWkday()
get the WkDay field

戻り値:
String

getMonth

public java.lang.String getMonth()
get the month

戻り値:
String

getHour

public int getHour()
get the hour

戻り値:
int

getMinute

public int getMinute()
get the minute

戻り値:
int

getSecond

public int getSecond()
get the second

戻り値:
int

setWkday

public void setWkday(java.lang.String w)
              throws java.lang.IllegalArgumentException
Set the wkday member

パラメータ:
w - String to set
例外:
java.lang.IllegalArgumentException - if w is not a valid day.

setDay

public void setDay(int d)
            throws java.lang.IllegalArgumentException
Set the day member

パラメータ:
d - int to set
例外:
java.lang.IllegalArgumentException - if d is not a valid day

setMonth

public void setMonth(java.lang.String m)
              throws java.lang.IllegalArgumentException
Set the month member

パラメータ:
m - String to set.
例外:
java.lang.IllegalArgumentException - if m is not a valid month

setYear

public void setYear(int y)
             throws java.lang.IllegalArgumentException
Set the year member

パラメータ:
y - int to set
例外:
java.lang.IllegalArgumentException - if y is not a valid year.

getYear

public int getYear()
Get the year member.


setHour

public void setHour(int h)
             throws java.lang.IllegalArgumentException
Set the hour member

パラメータ:
h - int to set
例外:
java.lang.IllegalArgumentException - if h is not a valid hour.

setMinute

public void setMinute(int m)
               throws java.lang.IllegalArgumentException
Set the minute member

パラメータ:
m - int to set
例外:
java.lang.IllegalArgumentException - if m is not a valid minute

setSecond

public void setSecond(int s)
               throws java.lang.IllegalArgumentException
Set the second member

パラメータ:
s - int to set
例外:
java.lang.IllegalArgumentException - if s is not a valid second

getDeltaSeconds

public int getDeltaSeconds()
Get the time offset from the current time.

戻り値:
offset from the current time.