All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.media.protocol.ContentDescriptor

java.lang.Object
   |
   +----javax.media.protocol.ContentDescriptor

public class ContentDescriptor
extends Object
A ContentDescriptor identifies media data containers.

Version:
1.10, 97/08/26.
See Also:
SourceStream

Variable Index

 o CONTENT_UNKNOWN
 o typeName

Constructor Index

 o ContentDescriptor(String)
Create a content descriptor with the specified name.

Method Index

 o getContentType()
Obtain a string that represents the content-name for this descriptor.
 o mimeTypeToPackageName(String)
Map a MIME content-type to an equivalent string of class-name components.

Variables

 o CONTENT_UNKNOWN
 public static final String CONTENT_UNKNOWN
 o typeName
 protected String typeName

Constructors

 o ContentDescriptor
 public ContentDescriptor(String cdName)
Create a content descriptor with the specified name.

To create a ContentDescriptor from a MIME type, use the mimeTypeToPackageName static member.

Parameters:
cdName - The name of the content-type.

Methods

 o getContentType
 public String getContentType()
Obtain a string that represents the content-name for this descriptor.

Returns:
The content-type name.
 o mimeTypeToPackageName
 protected static final String mimeTypeToPackageName(String mimeType)
Map a MIME content-type to an equivalent string of class-name components.

The MIME type is mapped to a string by:

  1. Replacing all slashes with a period.
  2. Converting all alphabetic characters to lower case.
  3. Converting all non-alpha-numeric characters other than periods to underscores (_).

For example, "text/html" would be converted to "text.html"

Parameters:
mimeType - The MIME type to map to a string.

All Packages  Class Hierarchy  This Package  Previous  Next  Index