|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.hunnysoft.jmime.Node
com.hunnysoft.jmime.Parameter
Class that represents a MIME header field parameter.
Parameter represents a parameter in a header
field body, such as the field body of a Content-Type
header field. The syntax of such a parameter is described in RFC 2045. A
parameter consists of a name/value pair. The following
Content-Type header field illustrates the syntax:
Content-type: text/plain; charset=iso-8859-1; format=flowed
In the above example, there are two parameters. The first parameter has the name "charset" and the value "iso-8859-1". The second parameter has the name "format" and value "flowed".
Parameter has methods for getting or setting the
parameter's name and value.
| Field Summary |
| Fields inherited from class com.hunnysoft.jmime.Node |
mIsModified, mParent, mString |
| Constructor Summary | |
Parameter()
Default constructor. |
|
Parameter(ByteString bstr)
Constructor that takes an initial byte string argument. |
|
Parameter(Parameter other)
Copy constructor. |
|
| Method Summary | |
void |
assemble()
Assembles the string representation. |
java.lang.Object |
clone()
Creates a copy of this object. |
java.lang.String |
name()
Gets the parameter name |
void |
parse()
Parses the string representation. |
void |
setName(java.lang.String name)
Sets the parameter name |
void |
setValue(java.lang.String value)
Sets the parameter value |
java.lang.String |
value()
Gets the parameter value |
| Methods inherited from class com.hunnysoft.jmime.Node |
_setString, isModified, parent, setModified, setParent, setString, string, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Parameter()
This constructor sets the Parameter object's string
representation to the empty string and sets its parent node to
null. The name and value are both set to the empty
string.
public Parameter(Parameter other)
This constructor performs a deep copy of its argument. The
parent node of the new Parameter object is set to
null.
other - Parameter instance to copypublic Parameter(ByteString bstr)
This constructor sets the Parameter object's string
representation to bstr and sets its parent node to
null.
Normally, you call the parse() method immediately
after this constructor to create the broken-down
representation.
bstr - initial value for the string representation| Method Detail |
public java.lang.Object clone()
This method, inherited from Object, creates a new
Parameter object that has the same value as this
Parameter object. The parent node of the new
Parameter object is set to null.
clone in class Nodepublic void parse()
This method, inherited from Node, executes the
parse operation for Parameter objects. The parse
operation updates the broken-down representation from the string
representation. For Parameter objects, the parse
operation parses the string representation to extract the name and
value of the parameter.
You should call this method after you set or modify the string representation, and before you retrieve the name or value.
This method clears the is-modified flag.
parse in class NodeNode.assemble()public void assemble()
This method, inherited from Node, executes the assemble
operation for Parameter objects. The assemble
operation creates or updates the string representation from the
broken-down representation. For Parameter objects, the
assemble operation builds the string representation from the name
and value.
You should call this method after you set or modify the name or value, and before you retrieve the string representation.
This method clears the is-modified flag.
assemble in class NodeNode.parse()public java.lang.String name()
public void setName(java.lang.String name)
name - parameter namepublic java.lang.String value()
public void setValue(java.lang.String value)
value - parameter value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||