jain.protocol.ip.sip.header
Class ContentEncodingHeader

java.lang.Object
  |
  +--jain.protocol.ip.sip.header.Header
        |
        +--jain.protocol.ip.sip.header.EntityHeader
              |
              +--jain.protocol.ip.sip.header.ContentEncodingHeader

public final class ContentEncodingHeader
extends EntityHeader

This class represents the Content-Encoding entity-header. A ContentEncodingHeader is used as a modifier to the "media-type". When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the ContentTypeHeader. The ContentEncodingHeader is primarily used to allow a body to be compressed without losing the identity of its underlying media type.

If multiple encodings have been applied to an entity, the ContentEncodingHeaders must be listed in the order in which they were applied.

All content-coding values are case-insensitive. The Internet Assigned Numbers Authority (IANA) acts as a registry for content-coding values

Clients may apply content encodings to the body in requests. If the server is not capable of decoding the body, or does not recognize any of the content-coding values, it must send a CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE ResponseMessage, listing acceptable encodings in an AcceptEncodingHeader. A server may apply content encodings to the bodies in ResponseMessage. The server must only use encodings listed in the AcceptEncodingHeader in the RequestMessage.

Version:
0.6

Field Summary
static java.lang.String token
          Token of ContentEncodingHeader
 
Fields inherited from class jain.protocol.ip.sip.header.Header
ENTITY_HEADER, GENERAL_HEADER, REQUEST_HEADER, RESPONSE_HEADER
 
Constructor Summary
ContentEncodingHeader(java.lang.String contentEncoding)
          Creates a ContentEncodingHeader based on given content-encoding
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of ContentEncodingHeader
 boolean equals(ContentEncodingHeader contentEncodingHeader)
          Indicates whether some other ContentEncodingHeader is "equal to" this one
 java.lang.String getContentEncoding()
          Gets contentEncoding of ContentEncodingHeader
 java.lang.String getValue()
          Gets value of ContentEncodingHeader
 void setContentEncoding(java.lang.String contentEncoding)
          Set content-encoding of ContentEncodingHeader
 
Methods inherited from class jain.protocol.ip.sip.header.Header
equals, getHeaderType, getToken, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

token

public static final java.lang.String token
Token of ContentEncodingHeader
Constructor Detail

ContentEncodingHeader

public ContentEncodingHeader(java.lang.String contentEncoding)
                      throws java.lang.IllegalArgumentException
Creates a ContentEncodingHeader based on given content-encoding
Parameters:
contentEncoding - content-encoding
Throws:
java.lang.IllegalArgumentException - if contentEncoding is null or zero-length
Method Detail

getContentEncoding

public java.lang.String getContentEncoding()
Gets contentEncoding of ContentEncodingHeader
Returns:
contentEncoding of ContentEncodingHeader

setContentEncoding

public void setContentEncoding(java.lang.String contentEncoding)
                        throws java.lang.IllegalArgumentException
Set content-encoding of ContentEncodingHeader
Parameters:
contentEncoding - content-encoding
Throws:
java.lang.IllegalArgumentException - if contentEncoding is null or zero-length

getValue

public java.lang.String getValue()
Gets value of ContentEncodingHeader
Overrides:
getValue in class Header
Returns:
value of ContentEncodingHeader

clone

public java.lang.Object clone()
Creates and returns a copy of ContentEncodingHeader
Overrides:
clone in class Header

equals

public boolean equals(ContentEncodingHeader contentEncodingHeader)
Indicates whether some other ContentEncodingHeader is "equal to" this one
Parameters:
contentEncodingHeader - the ContentEncodingHeader with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems