|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.wbi.util.HeaderField
HeaderField provides methods for dealing with a single
line of a MIME header. A header to consist of two parts: the value
and the parameters. Consider a header field like this:
Header-Field: foobarbaz; a=x; b=y; secure; c=zAssuming the header is part of a
MimeHeaderAscii
called h, you can get a HeaderField
object like this: h.parseHeaderField("Header-Field");.
The "value" part is "foobarbaz", and parameters are "a", "b",
"secure", and "c". "secure" has no value (the empty string), and
"a", "b", and "c" have the obvious values ("x", "y", and "z",
respectively).
MimeHeaderAscii| Field Summary | |
protected CIHashtable |
params
|
protected java.lang.String |
val
|
| Constructor Summary | |
HeaderField()
Creates a new HeaderField instance. |
|
HeaderField(java.lang.String full)
Creates a new HeaderField instance. |
|
| Method Summary | |
java.lang.Object |
clone()
Make a clone or deep-copy of this header field |
java.lang.String |
getParam(java.lang.String p)
Get the named paramter of the header field |
java.lang.String |
getParameters()
Get a string represenation of the parameters of this header field. |
java.lang.String |
getValue()
Get the value of the header field |
static void |
main(java.lang.String[] argv)
Testing code |
java.lang.String |
removeParam(java.lang.String p)
Remove the named parameter |
void |
removeParameters()
Delete all the paramaters. |
void |
setParam(java.lang.String p,
java.lang.String v)
Set the named parameter to the specified value |
void |
setValue(java.lang.String val)
Set the value of the header field |
java.lang.String |
toString()
Give the string representation of the header field |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String val
protected CIHashtable params
| Constructor Detail |
public HeaderField()
HeaderField instance.public HeaderField(java.lang.String full)
HeaderField instance.full - The unparsed value of the header field| Method Detail |
public java.lang.Object clone()
clone in class java.lang.ObjectObject valuepublic java.lang.String toString()
toString in class java.lang.ObjectString valuepublic java.lang.String getValue()
String valuepublic void setValue(java.lang.String val)
val - a String valuepublic java.lang.String getParam(java.lang.String p)
p - The name of the paramater
public void setParam(java.lang.String p,
java.lang.String v)
p - The name of the paramter to setv - The value to set the parameter topublic java.lang.String removeParam(java.lang.String p)
p - The name of the parameter to removepublic java.lang.String getParameters()
String valuepublic void removeParameters()
public static void main(java.lang.String[] argv)
throws java.lang.Exception
argv[] - a String valuejava.lang.Exception - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||