Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.james.mime4j.descriptor
Interface ContentDescriptor

All Known Subinterfaces:
  BodyDescriptor, MutableBodyDescriptor, RFC2045MimeDescriptor

All Known Implementing Classes:
  DefaultBodyDescriptor, MaximalBodyDescriptor

    public interface ContentDescriptor

Represents common content properties.

Version:
  $Id:$

Method Summary
`java.lang.String` | `getCharset()` The body descriptors character set, defaulted appropriately for the MIME type.
`long` | `getContentLength()` Returns the body descriptors content-length.
`java.util.Map` | `getContentTypeParameters()` Returns the map of parameters of the content-type header.
`java.lang.String` | `getMediaType()` Gets the defaulted MIME media type for this content.
`java.lang.String` | `getMimeType()` Returns the body descriptors MIME type.
`java.lang.String` | `getSubType()` Gets the defaulted MIME sub type for this content.
`java.lang.String` | `getTransferEncoding()` Returns the body descriptors transfer encoding.

Method Detail

### getMimeType

    java.lang.String getMimeType()

  Returns the body descriptors MIME type.

  Returns:
    The MIME type, which has been parsed from the content-type definition. Must not be null, but "text/plain", if no content-type was specified.
  See Also:
    `getMediaType()`, `getSubType()`

### getMediaType

    java.lang.String getMediaType()

  Gets the defaulted MIME media type for this content. For example `TEXT`, `IMAGE`, `MULTIPART`

  Returns:
    the MIME media type when content-type specified, otherwise the correct default (`TEXT`)
  See Also:
    `getMimeType()`

### getSubType

    java.lang.String getSubType()

  Gets the defaulted MIME sub type for this content.

  Returns:
    the MIME media type when content-type is specified, otherwise the correct default (`PLAIN`)
  See Also:
    `getMimeType()`

### getCharset

    java.lang.String getCharset()

  The body descriptors character set, defaulted appropriately for the MIME type.

  For `TEXT` types, this will be defaulted to `us-ascii`. For other types, when the charset parameter is missing this property will be null.

  Returns:
    Character set, which has been parsed from the content-type definition. Not null for `TEXT` types, when unset will be set to default `us-ascii`. For other types, when unset, null will be returnedsvn s

### getTransferEncoding

    java.lang.String getTransferEncoding()

  Returns the body descriptors transfer encoding.

  Returns:
    The transfer encoding. Must not be null, but "7bit", if no transfer-encoding was specified.

### getContentTypeParameters

    java.util.Map getContentTypeParameters()

  Returns the map of parameters of the content-type header.

### getContentLength

    long getContentLength()

  Returns the body descriptors content-length.

  Returns:
    Content length, if known, or -1, to indicate the absence of a content-length header.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.