NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.header
Class ContentEncoding

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sip.header.SIPObject
          extended by gov.nist.javax.sip.header.SIPHeader
              extended by gov.nist.javax.sip.header.ContentEncoding
All Implemented Interfaces:
HeaderExt, SIPHeaderNames, Serializable, Cloneable, ContentEncodingHeader, Encoding, Header

public class ContentEncoding
extends SIPHeader
implements ContentEncodingHeader

Content encoding part of a content encoding header list.

Since:
1.1
Version:
1.2 $Revision: 1.5 $ $Date: 2009/07/17 18:57:29 $
Author:
M. Ranganathan
, Olivier Deruelle
See Also:
 From HTTP RFC 2616
14.11 Content-Encoding

   The Content-Encoding entity-header field 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 Content-Type header field. Content-Encoding is
   primarily used to allow a document to be compressed without losing
   the identity of its underlying media type.

       Content-Encoding  = "Content-Encoding" ":" 1#content-coding

   Content codings are defined in section 3.5. An example of its use is

       Content-Encoding: gzip

   The content-coding is a characteristic of the entity identified by
   the Request-URI. Typically, the entity-body is stored with this
   encoding and is only decoded before rendering or analogous usage.
   However, a non-transparent proxy MAY modify the content-coding if the
   new coding is known to be acceptable to the recipient, unless the
   "no-transform" cache-control directive is present in the message.

   If the content-coding of an entity is not "identity", then the
   response MUST include a Content-Encoding entity-header (section
   14.11) that lists the non-identity content-coding(s) used.

   If the content-coding of an entity in a request message is not
   acceptable to the origin server, the server SHOULD respond with a
   status code of 415 (Unsupported Media Type).

   If multiple encodings have been applied to an entity, the content
   codings MUST be listed in the order in which they were applied.
   Additional information about the encoding parameters MAY be provided
   by other entity-header fields not defined by this specification.
, Serialized Form

Field Summary
 
Fields inherited from interface javax.sip.header.ContentEncodingHeader
NAME
 
Fields inherited from interface 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, JOIN, MAX_FORWARDS, MIME_VERSION, MIN_EXPIRES, MIN_SE, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REFERRED_BY, REPLACES, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SESSION_EXPIRES, SIP_ETAG, SIP_IF_MATCH, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE
 
Constructor Summary
ContentEncoding()
          Default constructor.
ContentEncoding(String enc)
          Constructor.
 
Method Summary
 String encodeBody()
          Canonical encoding of body of the header.
 String getEncoding()
          Get the ContentEncoding field.
 void setEncoding(String encoding)
          Set the ConentEncoding field.
 
Methods inherited from class gov.nist.javax.sip.header.SIPHeader
encode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toString
 
Methods inherited from class gov.nist.javax.sip.header.SIPObject
dbgPrint, debugDump, debugDump, equals, match
 
Methods inherited from class gov.nist.core.GenericObject
clone, getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sip.header.Header
clone, equals, getName, hashCode, toString
 

Constructor Detail

ContentEncoding

public ContentEncoding()
Default constructor.


ContentEncoding

public ContentEncoding(String enc)
Constructor.

Parameters:
enc - String to set.
Method Detail

encodeBody

public String encodeBody()
Canonical encoding of body of the header.

Returns:
encoded body of the header.

getEncoding

public String getEncoding()
Get the ContentEncoding field.

Specified by:
getEncoding in interface Encoding
Returns:
String

setEncoding

public void setEncoding(String encoding)
                 throws ParseException
Set the ConentEncoding field.

Specified by:
setEncoding in interface Encoding
Parameters:
encoding - String to set
Throws:
ParseException - which signals that an error has been reached unexpectedly while parsing the encoding value.

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.