|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgate.corpora.MimeType
A very basic implementation for a MIME Type.
| Field Summary | |
protected Map |
parameters
The parameters map. |
protected String |
subtype
The subtype component |
protected String |
type
The type component |
| Constructor Summary | |
MimeType(String type,
String subType)
Constructor from type and subtype. |
|
| Method Summary | |
void |
addParameter(String param,
String value)
Adds (and replaces if necessary) a parameter to this MIME type. |
boolean |
equals(Object other)
Two MIME Types are equal if their types and subtypes coincide. |
String |
getParameterValue(String name)
Gets the value for a particular parameter. |
String |
getSubtype()
Returns the subtype component of this MIME Type. |
String |
getType()
Returns the type component of this MIME Type. |
int |
hashCode()
The hashcode is composed (by addition) from the hashcodes for the type and subtype. |
boolean |
hasParameter(String name)
Checks to see if this MIME type has a particular parameter. |
void |
setSubtype(String subtype)
Sets the subtype component of this MIME type. |
void |
setType(String type)
Sets the type component of this MIME type. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String type
protected String subtype
protected Map parameters
| Constructor Detail |
public MimeType(String type,
String subType)
type - subType - | Method Detail |
public boolean equals(Object other)
other - the othe MIME Type to be compared with this one.
public int hashCode()
public String getType()
public void setType(String type)
type - a String value.public String getSubtype()
public void setSubtype(String subtype)
subtype - a String value.
public void addParameter(String param,
String value)
param - the name of the parameter.value - the value of the parameter.public String getParameterValue(String name)
name - the name of the parameter.
String value.public boolean hasParameter(String name)
name - the name of the parameter.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||