Enterprise Information Portal APIs

com.ibm.gcs.netutil.http
Class MimeType

java.lang.Object
  |
  +--com.ibm.gcs.netutil.http.MimeType

public final class MimeType
extends java.lang.Object

MimeType is a class to represent mime type/subtype entities. For example, a MimeType object could be created for the String "text/html", and it would have type "text" and subtype "html".


Constructor Summary
MimeType(java.lang.String string)
          (constructor) make a MimeType object from a string of the form "type/subtype".
MimeType(java.lang.String type, java.lang.String subtype)
          (constructor) make a MimeType object from a type and subtype
 
Method Summary
 java.lang.String getSubtype()
          get the subtype of this MimeType
 java.lang.String getType()
          get the type of this MimeType
 void setSubtype(java.lang.String subtype)
          set the subtype of this MimeType
 void setType(java.lang.String type)
          set the type of this MimeType
 java.lang.String toString()
          get this MimeType as a String of the form "type/subtype"
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MimeType

public MimeType(java.lang.String type,
                java.lang.String subtype)
(constructor) make a MimeType object from a type and subtype

MimeType

public MimeType(java.lang.String string)
         throws IllegalMimeTypeException
(constructor) make a MimeType object from a string of the form "type/subtype". if there is no '/' in the mimetype string, mimetype = "content/unknown"
Method Detail

getType

public java.lang.String getType()
get the type of this MimeType

setType

public void setType(java.lang.String type)
set the type of this MimeType

getSubtype

public java.lang.String getSubtype()
get the subtype of this MimeType

setSubtype

public void setSubtype(java.lang.String subtype)
set the subtype of this MimeType

toString

public java.lang.String toString()
get this MimeType as a String of the form "type/subtype"
Overrides:
toString in class java.lang.Object

EIP Web Crawler APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.