## org.w3c.www.http
Class HttpEntityMessage

    java.lang.Object
      |
      +--org.w3c.www.http.HttpMessage
            |
            +--org.w3c.www.http.HttpEntityMessage

Direct Known Subclasses:
  HttpReplyMessage, HttpRequestMessage

public class HttpEntityMessage
extends HttpMessage

Field Summary
`static int` | `H_ALLOW`
`static int` | `H_CONTENT_BASE`
`static int` | `H_CONTENT_ENCODING`
`static int` | `H_CONTENT_LANGUAGE`
`static int` | `H_CONTENT_LENGTH`
`static int` | `H_CONTENT_LOCATION`
`static int` | `H_CONTENT_MD5`
`static int` | `H_CONTENT_RANGE`
`static int` | `H_CONTENT_TYPE`
`static int` | `H_ETAG`
`static int` | `H_EXPIRES`
`static int` | `H_LAST_MODIFIED`

Fields inherited from class org.w3c.www.http.HttpMessage
`descriptors, EMIT_ALL, EMIT_BODY, EMIT_FOOTERS, EMIT_HEADERS, emitdate, factory, H_CACHE_CONTROL, H_CMAN_EXT, H_CONNECTION, H_COOKIE, H_COPT_EXT, H_DATE, H_MAN_EXT, H_OPT_EXT, H_PRAGMA, H_PROTOCOL, H_PROTOCOL_INFO, H_PROTOCOL_QUERY, H_PROTOCOL_REQUEST, H_PROXY_CONNECTION, H_SET_COOKIE, H_TRAILER, H_TRANSFER_ENCODING, H_UPGRADE, H_VIA, headers, major, MAX_HEADERS, minor, state, values`

Constructor Summary
`HttpEntityMessage()`
`HttpEntityMessage(MimeParser parser)`

Method Summary
`void` | `addContentEncoding(java.lang.String name)` Add an encoding token to the given reply stream (ie the body).
`java.lang.String[]` | `getAllow()` Get the message's entity allowed methods.
`java.lang.String` | `getContentBase()` Get this message entity base.
`java.lang.String[]` | `getContentEncoding()` Get this message entity encoding.
`java.lang.String[]` | `getContentLanguage()` Get this message entity content language.
`int` | `getContentLength()` Get the content length of the message.
`java.lang.String` | `getContentLocation()` Get the attached entity's content location.
`java.lang.String` | `getContentMD5()` Get the entity's content MD5 checksum.
`HttpContentRange` | `getContentRange()` Get the range descriptor of the attached entity.
`MimeType` | `getContentType()` Get the entity MIME type.
`HttpEntityTag` | `getETag()` Get this entity tag.
`long` | `getExpires()` Get this message's entity expires date.
`long` | `getLastModified()` Get the message's associated entity last modified time.
`boolean` | `hasContentRange()` Is this entity only a partial entity ?
`void` | `setAllow(java.lang.String[] mth)` Set this message's entity allowed methods.
`void` | `setContentBase(java.lang.String base)` Set this message entity content base.
`void` | `setContentEncoding(java.lang.String[] encodings)` Set this message entity content encoding.
`void` | `setContentLanguage(java.lang.String[] languages)` Set this message entity content language.
`void` | `setContentLength(int length)` Set this message entity content-length.
`void` | `setContentLocation(java.lang.String location)` Set the entity's content location.
`void` | `setContentMD5(java.lang.String md5)` Set the entity's content MD5 checksum.
`void` | `setContentType(MimeType type)` Set the entity MIME type.
`void` | `setETag(HttpEntityTag tag)` Set this entity tag.
`void` | `setExpires(long date)` Se the message's associated entity exxpires date.
`void` | `setLastModified(long date)` Set the message's entity header last-modified time.

Methods inherited from class org.w3c.www.http.HttpMessage

`addConnection, addNoCache, addPragma, addProxyConnection, addTransferEncoding, addVia, checkNoStore, checkOnlyIfCached, delState, dump, emit, emit, emitHeaders, endEmit, enumerateHeaderDescriptions, enumerateHeaderDescriptions, generateExtNamespace, getCacheControl, getClone, getConnection, getCookie, getDate, getEmitDate, getExtensionHeaders, getHeaderValue, getHeaderValue, getHeaderValue, getHeaderValue, getHttpCManExtDecl, getHttpCOptExtDecl, getHttpManExtDecl, getHttpOptExtDecl, getMajorVersion, getMaxAge, getMinorVersion, getNoCache, getPragma, getProtocol, getProtocolInfo, getProtocolQuery, getProtocolRequest, getProxyConnection, getSetCookie, getState, getStateNames, getTrailer, getTransferEncoding, getUpgrade, getValue, getValue, getVersion, getVia, hasConnection, hasHeader, hasHeader, hasPragma, hasProxyConnection, hasState, hasTransferEncoding, notifyBeginParsing, notifyEndParsing, notifyHeader, registerHeader, registerHeader, removeHeader, removeHeader, setCacheControl, setConnection, setCookie, setDate, setEnd2EndExtensionAcknowledgmentHeader, setExtensionHeader, setHeaderValue, setHeaderValue, setHeaderValue, setHopByHopExtensionAcknowledgmentHeader, setHttpCManExtDecl, setHttpCOptExtDecl, setHttpManExtDecl, setHttpOptExtDecl, setMaxAge, setNamespaces, setNoCache, setNoCache, setNoStore, setOnlyIfCached, setPragma, setProtocol, setProtocolInfo, setProtocolQuery, setProtocolRequest, setProxyConnection, setSetCookie, setState, setTrailer, setTransferEncoding, setUpgrade, setValue, setVia, startEmit`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### H_ALLOW

    public static int H_ALLOW

### H_CONTENT_LENGTH

    public static int H_CONTENT_LENGTH

### H_CONTENT_BASE

    public static int H_CONTENT_BASE

### H_CONTENT_ENCODING

    public static int H_CONTENT_ENCODING

### H_CONTENT_LANGUAGE

    public static int H_CONTENT_LANGUAGE

### H_CONTENT_LOCATION

    public static int H_CONTENT_LOCATION

### H_CONTENT_MD5

    public static int H_CONTENT_MD5

### H_CONTENT_RANGE

    public static int H_CONTENT_RANGE

### H_CONTENT_TYPE

    public static int H_CONTENT_TYPE

### H_ETAG

    public static int H_ETAG

### H_EXPIRES

    public static int H_EXPIRES

### H_LAST_MODIFIED

    public static int H_LAST_MODIFIED

Constructor Detail

### HttpEntityMessage

    public HttpEntityMessage(MimeParser parser)

### HttpEntityMessage

    public HttpEntityMessage()

Method Detail

### getAllow

    public java.lang.String[] getAllow()

  Get the message's entity allowed methods.
  Returns:
    The list of allowed methods, encoded as a String array, or null if undefined.

### setAllow

    public void setAllow(java.lang.String[] mth)

  Set this message's entity allowed methods.
  Parameters:
    `mth` - A list of allowed methods, encoded as a String array, or null to reset the value.

### getContentBase

    public java.lang.String getContentBase()

  Get this message entity base.
  Returns:
    A String encoding the content base, or null if undefined.

### setContentBase

    public void setContentBase(java.lang.String base)

  Set this message entity content base.
  Parameters:
    `base` - The base for the entity, encoded as a String, or null to reset the value.

### getContentEncoding

    public java.lang.String[] getContentEncoding()

  Get this message entity encoding.
  Returns:
    A list of encoding tokens, encoded as a String array, or null if undefined.

### setContentEncoding

    public void setContentEncoding(java.lang.String[] encodings)

  Set this message entity content encoding.
  Parameters:
    `encodings` - A list of encoding tokens, encoded as a String array or null to reset the value.

### addContentEncoding

    public void addContentEncoding(java.lang.String name)

  Add an encoding token to the given reply stream (ie the body).
  Parameters:
    `name` - The name of the encoding to add.

### getContentLanguage

    public java.lang.String[] getContentLanguage()

  Get this message entity content language.
  Returns:
    A list of languages token, encoded as a String arry, or null if undefined.

### setContentLanguage

    public void setContentLanguage(java.lang.String[] languages)

  Set this message entity content language.
  Parameters:
    `languages` - The language tokens for this entity, encoded as a String array, or null to reset the value.

### getContentLength

    public int getContentLength()

  Get the content length of the message.
  Returns:
    The content length for the message entity, or -1 if undefined.

### setContentLength

    public void setContentLength(int length)

  Set this message entity content-length.
  Parameters:
    `length` - The new content length for this message, or -1 to reset the value.

### getContentLocation

    public java.lang.String getContentLocation()

  Get the attached entity's content location.
  Returns:
    A String encoded value of the content location, or null if undefined.

### setContentLocation

    public void setContentLocation(java.lang.String location)

  Set the entity's content location.
  Parameters:
    `location` - The String encoding the content location for the attached entity, or null to reset the value.

### getContentMD5

    public java.lang.String getContentMD5()

  Get the entity's content MD5 checksum.
  Returns:
    A String giving the base64 encoded MD% checksun on the entity body, or null if undefined.

### setContentMD5

    public void setContentMD5(java.lang.String md5)

  Set the entity's content MD5 checksum.
  Parameters:
    `md5` - The new base64 encoded checksum for the entity body, or null to reset the value.

### getContentRange

    public HttpContentRange getContentRange()

  Get the range descriptor of the attached entity.
  Returns:
    An HttpRange instance, describing the part of the full entity body being transmited, or null if undefined.

### hasContentRange

    public boolean hasContentRange()

  Is this entity only a partial entity ?
  Returns:
    A boolean, indicating if a `Content-Range` header was present.

### getContentType

    public MimeType getContentType()

  Get the entity MIME type.
  Returns:
    An HttpMimeType object describing the entity's type, or null if udefined.

### setContentType

    public void setContentType(MimeType type)

  Set the entity MIME type.
  Parameters:
    `type` - The entity MIME type, or null to unset the entity's content type.

### getETag

    public HttpEntityTag getETag()

  Get this entity tag.
  Returns:
    An HttpEntityTag instance describing this entity tag.

### setETag

    public void setETag(HttpEntityTag tag)

  Set this entity tag.
  Parameters:
    `tag` - The new entity tag, or null to reset the value.

### getExpires

    public long getExpires()

  Get this message's entity expires date.
  Returns:
    A long giving the date as the number of milliseconds since the Java epoch, or -1 if undefined.

### setExpires

    public void setExpires(long date)

  Se the message's associated entity exxpires date.
  Parameters:
    `date` - The date as the number of milliseconds since Java epoch, or -1 to reset the value.

### getLastModified

    public long getLastModified()

  Get the message's associated entity last modified time.
  Returns:
    A long giving the date as the number of milliseconds since Java epoch, or -1 if undefined.

### setLastModified

    public void setLastModified(long date)

  Set the message's entity header last-modified time.
  Parameters:
    `date` - The date of last modification, as the number of milliseconds since Java epoch, or -1 to reset the value.