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

## org.apache.tomcat.util.http
Class ContentType

    java.lang.Object
      org.apache.tomcat.util.http.ContentType

public class ContentType
extends java.lang.Object

Usefull methods for Content-Type processing

Author:
  James Duncan Davidson [duncan@eng.sun.com], James Todd [gonzo@eng.sun.com], Jason Hunter [jch@eng.sun.com], Harish Prabandham, costin@eng.sun.com

Constructor Summary
`ContentType()`

Method Summary
`static java.lang.String` | `getCharsetFromContentType(java.lang.String contentType)` Parse the character encoding from the specified content type header.
`static boolean` | `hasCharset(java.lang.String type)` Returns true if the given content type contains a charset component, false otherwise.

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

Constructor Detail

### ContentType

    public ContentType()

Method Detail

### getCharsetFromContentType

    public static java.lang.String getCharsetFromContentType(java.lang.String contentType)

  Parse the character encoding from the specified content type header. If the content type is null, or there is no explicit character encoding, `null` is returned.

  Parameters:
    `contentType` - a content type header

### hasCharset

    public static boolean hasCharset(java.lang.String type)

  Returns true if the given content type contains a charset component, false otherwise.

  Parameters:
    `type` - Content type
  Returns:
    true if the given content type contains a charset component, false otherwise

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

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