|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentType
This provides access to the MIME type parts, that is the type
subtype and an optional charset
parameter. The
charset
parameter is one of many parameters that
can be assiciated with a MIME type. This however only provides
access to the charset
value.
The getCharset
will return val
if the
MIME type represented is type/subtype; charset=val. The type and
subtype are set to the String
value null
if the setPrimary
or setSecondary
are
given a null
String
.
Method Summary | |
---|---|
java.lang.String |
getCharset()
This is used to retrive the charset of this MIME
type. |
java.lang.String |
getPrimary()
This is used to retrive the type of this MIME type. |
java.lang.String |
getSecondary()
This is used to retrive the subtype of this MIME type. |
void |
setCharset(java.lang.String charset)
This will set the charset to whatever value is
in the String object. |
void |
setPrimary(java.lang.String type)
This sets the type to whatever value is in the String
object. |
void |
setSecondary(java.lang.String type)
Sets the subtype to whatever value is in the String
object. |
java.lang.String |
toString()
This will return the String value of the MIME
type. |
Method Detail |
---|
void setPrimary(java.lang.String type)
String
object. If the String
object is null
the
this object's toString
method will contain the value
null
.
If type is null
then the toString
method
will be null/subtype;param=value. If the type is non-null this will
contain the value of the String
.
type
- the type to add to the MIME typejava.lang.String getPrimary()
type/subtype;param1=value1
. This will return the
value of the type part. If there is no type part then this will
return null
otherwise the type String
.
void setSecondary(java.lang.String type)
String
object. If the String
object is null
the this object's toString
method will contain the
value null
.
If subtype is null
then the toString
method will be type/null;param=value
. If the type
is non-null this will contain the value of the String
.
type
- the type to add to the MIME typejava.lang.String getSecondary()
type/subtype;param1=value1
. This will
return the value of the subtype part. If there is no subtype
part then this will return null
otherwise the type
String
.
void setCharset(java.lang.String charset)
charset
to whatever value is
in the String
object. If the String
object is null
then this toString
method will not contain the charset
.
If charset
is null
then the
toString
method will be type/subtype. If the
charset
value is non-null this will contain
the charset
parameter with that value.
charset
- the value to add to the MIME typejava.lang.String getCharset()
charset
of this MIME
type. The charset
part within the MIME type is an
optional parameter. For example type/subtype;charset=value
. This will return the value of the charset
value. If there is no charset
param then this will
return null
otherwise the type String
.
charset
value for the MIME typejava.lang.String toString()
String
value of the MIME
type. This will return the MIME type with the type, subtype
and if there is a charset
value specified then
a charset
parameter.
The
charset
parameter is an optional parameter
to the MIME type. An example a MIME type is type/subtype;
charset=value
. If the type or subtype is
null
then the MIME type will be wither null/subtype, type/null or if
both are null
null/null.
toString
in class java.lang.Object
String
representation of the MIME type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |