org.apache.jetspeed.util
Class MimeType

java.lang.Object
  extended byorg.apache.jetspeed.util.MimeType

public class MimeType
extends java.lang.Object

Utility class for declaring MIME types to use for various requests and provide utility manipulation methods.

Added Content-Encoding capability, with defaults

Version:
$Id: MimeType.java,v 1.9 2005/03/21 18:21:44 sgala Exp $
Author:
Raphaël Luta, Santiago Gala

Field Summary
static MimeType HTML
           
static MimeType VXML
           
static MimeType WML
           
static MimeType XHTML
           
static MimeType XML
           
 
Constructor Summary
MimeType(java.lang.String mimeType)
           
MimeType(java.lang.String mimeType, java.lang.String charSet)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare one MimeType to another
 java.lang.String getCharSet()
          Return the character encoding associated, if any
 java.lang.String getCode()
          Extracts from this MimeType a user-friendly identifying code ie "html" for "text/html" or "wml" for "text/vnd.wap.wml"
 java.lang.String getContentType()
          Return the media type associated
 java.lang.String toString()
          Convert this MimeType to its external String representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HTML

public static final MimeType HTML

XHTML

public static final MimeType XHTML

WML

public static final MimeType WML

XML

public static final MimeType XML

VXML

public static final MimeType VXML
Constructor Detail

MimeType

public MimeType(java.lang.String mimeType)

MimeType

public MimeType(java.lang.String mimeType,
                java.lang.String charSet)
Method Detail

getCode

public java.lang.String getCode()
Extracts from this MimeType a user-friendly identifying code ie "html" for "text/html" or "wml" for "text/vnd.wap.wml"

Returns:
the simplified type

getContentType

public java.lang.String getContentType()
Return the media type associated


getCharSet

public java.lang.String getCharSet()
Return the character encoding associated, if any


toString

public java.lang.String toString()
Convert this MimeType to its external String representation


equals

public boolean equals(java.lang.Object obj)
Compare one MimeType to another



Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.