public static class HeaderSet.Header
extends java.lang.Object
implements java.io.Serializable
A header can be treated as a parsed, semantic type, dependent on context, or purely as a string. The two formats can be converted to and from each other.
Note that the name of the header is only available as a key to the HeaderSet
:
it cannot be infered from the Header object itself.
HeaderParser
,
Serialized FormConstructor and Description |
---|
HeaderSet.Header(java.lang.Object o)
Construct a header from the parsed object.
|
HeaderSet.Header(java.lang.String s)
Construct a header from the MIME string value
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
int |
getLength() |
java.lang.Object |
getParsed(HeaderParser p)
Retrieve the semantic version of this object.
|
java.util.Iterator<java.lang.String> |
getStringValues()
Deprecated.
this doesn't work as you'd expect.
|
int |
hashCode() |
void |
setParsed(java.lang.Object o)
Set value from parsed object.
|
void |
setString(java.lang.String s)
Set the value of this header from the MIME string.
|
java.lang.String |
toString()
Get string value suitable for use in a MIME header.
|
public HeaderSet.Header(java.lang.Object o)
public HeaderSet.Header(java.lang.String s)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<java.lang.String> getStringValues()
public java.lang.Object getParsed(HeaderParser p) throws java.text.ParseException
p
- The parser to use for this header.java.text.ParseException
public void setParsed(java.lang.Object o)
Note the parsed form must match whatever type a parser
used in getParsed(com.vordel.mime.HeaderParser)
will produce for the same header.
o
- The parsed objectpublic void setString(java.lang.String s)
s
- the string value of the header.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getLength()
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel