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

java.lang.Object
  上位を拡張 gov.nist.core.GenericObject
      上位を拡張 gov.nist.javax.sip.header.SIPObject
          上位を拡張 gov.nist.javax.sip.header.SIPHeader
              上位を拡張 gov.nist.javax.sip.header.ContentLength
すべての実装されたインタフェース:
SIPHeaderNames, java.io.Serializable, java.lang.Cloneable, javax.sip.header.ContentLengthHeader, javax.sip.header.Header

public class ContentLength
extends SIPHeader
implements javax.sip.header.ContentLengthHeader

ContentLength SIPHeader (of which there can be only one in a SIPMessage).

Fielding, et al.            Standards Track                   [Page 119]
RFC 2616                        HTTP/1.1                       June 1999


      14.13 Content-Length

   The Content-Length entity-header field indicates the size of the
   entity-body, in decimal number of OCTETs, sent to the recipient or,
   in the case of the HEAD method, the size of the entity-body that
   would have been sent had the request been a GET.

       Content-Length    = "Content-Length" ":" 1*DIGIT

   An example is

       Content-Length: 3495

   Applications SHOULD use this field to indicate the transfer-length of
   the message-body, unless this is prohibited by the rules in section
   4.4.

   Any Content-Length greater than or equal to zero is a valid value.
   Section 4.4 describes how to determine the length of a message-body
   if a Content-Length is not given.

   Note that the meaning of this field is significantly different from
   the corresponding definition in MIME, where it is an optional field
   used within the "message/external-body" content-type. In HTTP, it
   SHOULD be sent whenever the message's length can be determined prior
   to being transferred, unless this is prohibited by the rules in
   section 4.4.
 

バージョン:
JAIN-SIP-1.1 $Revision: 1.2 $ $Date: 2004/01/22 13:26:29 $
作成者:
M. Ranganathan
, Olivier Deruelle
関連項目:
直列化された形式

フィールドの概要
 
インタフェース javax.sip.header.ContentLengthHeader から継承されたフィールド
NAME
 
インタフェース gov.nist.javax.sip.header.SIPHeaderNames から継承されたフィールド
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ALERT_INFO, ALLOW, ALLOW_EVENTS, AUTHENTICATION_INFO, AUTHORIZATION, CALL_ID, CALL_INFO, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, ERROR_INFO, EVENT, EXPIRES, FROM, IN_REPLY_TO, MAX_FORWARDS, MIME_VERSION, MIN_EXPIRES, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE
 
コンストラクタの概要
ContentLength()
          Default constructor.
ContentLength(int length)
          Constructor given a length.
 
メソッドの概要
 java.lang.String encodeBody()
          Encode into a canonical string.
 int getContentLength()
          get the ContentLength field.
 boolean match(java.lang.Object other)
          Pattern matcher ignores content length.
 void setContentLength(int contentLength)
          Set the contentLength member
 
クラス gov.nist.javax.sip.header.SIPHeader から継承されたメソッド
encode, getHeaderName, getHeaderValue, getName, getValue, isHeaderList, setHeaderName
 
クラス gov.nist.javax.sip.header.SIPObject から継承されたメソッド
clone, dbgPrint, debugDump, debugDump, equals, merge, replace, replace, replace, replace, toString
 
クラス gov.nist.core.GenericObject から継承されたメソッド
getClassFromName, getMatcher, isMySubclass, setMatcher
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース javax.sip.header.Header から継承されたメソッド
clone, equals, getName, toString
 

コンストラクタの詳細

ContentLength

public ContentLength()
Default constructor.


ContentLength

public ContentLength(int length)
Constructor given a length.

メソッドの詳細

getContentLength

public int getContentLength()
get the ContentLength field.

定義:
インタフェース javax.sip.header.ContentLengthHeader 内の getContentLength
戻り値:
int

setContentLength

public void setContentLength(int contentLength)
                      throws javax.sip.InvalidArgumentException
Set the contentLength member

定義:
インタフェース javax.sip.header.ContentLengthHeader 内の setContentLength
パラメータ:
contentLength - int to set
例外:
javax.sip.InvalidArgumentException

encodeBody

public java.lang.String encodeBody()
Encode into a canonical string.

戻り値:
String

match

public boolean match(java.lang.Object other)
Pattern matcher ignores content length.

オーバーライド:
クラス SIPObject 内の match
パラメータ:
other - the match pattern to test against. The match object has to be of the same type (class). Primitive types and non-sip fields that are non null are matched for equality. Null in any field matches anything. Some book-keeping fields are ignored when making the comparison.