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

## com.vordel.mime
Class ContentType

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.HashMap<java.lang.String,java.lang.String>
              com.vordel.mime.ContentType

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>

    public class ContentType

extends java.util.HashMap<java.lang.String,java.lang.String>

A ContentType represents a parsed MIME "Content-Type" header.

Besides an underlying MIME type, "Content-Type" headers include a set of properties, for example, a character set for text bodyparts. This class implements the Map interface to expose those properties.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `ContentType.Authority`

Nested classes/interfaces inherited from class java.util.AbstractMap
`java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

Field Summary
`static HeaderParser` | `parser` use to get decoded ContentType objects from `HeaderSet`s

Constructor Summary
`ContentType(ContentType.Authority authority, java.lang.String basic)` Create a new ContentType from a basic MIME type string.

Method Summary
`boolean` | `equals(java.lang.Object other)` Tests if two MIME types represent the same basic type.
`ContentType.Authority` | `getAuthority()`
`java.lang.String` | `getType()`
`java.lang.String` | `toString()` Convert the object into a string suitable for insertion as a value for a "Content-Type:" header in a MIME message.

Methods inherited from class java.util.HashMap
`clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values`

Methods inherited from class java.util.AbstractMap
`hashCode`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`hashCode`

Field Detail

### parser

    public static final HeaderParser parser

  use to get decoded ContentType objects from `HeaderSet`s

  See Also:
    `HeaderSet.getParsed(HeaderParser)`

Constructor Detail

### ContentType

    public ContentType(ContentType.Authority authority,
                       java.lang.String basic)

  Create a new ContentType from a basic MIME type string. (eg, "application/octet-stream")

Method Detail

### getAuthority

    public ContentType.Authority getAuthority()

### getType

    public java.lang.String getType()

  Returns:
    string description of the basic MIME type.

### toString

    public java.lang.String toString()

  Convert the object into a string suitable for insertion as a value for a "Content-Type:" header in a MIME message.

  Overrides:
    `toString` in class `java.util.AbstractMap<java.lang.String,java.lang.String>`
  Returns:
    A Content-Type compatible string

### equals

    public boolean equals(java.lang.Object other)

  Tests if two MIME types represent the same basic type.

  NOTE: this does _not_ take account of attribute values.

  Specified by:
    `equals` in interface `java.util.Map<java.lang.String,java.lang.String>`
  Overrides:
    `equals` in class `java.util.AbstractMap<java.lang.String,java.lang.String>`

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

This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel