|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.w3c.www.mime.MimeHeaders
The most stupid MIME header holder. This class uses a hashtable mapping header names (as String), to header values (as String). Header names are lowered before entering the hashtable.
| Constructor Summary | |
MimeHeaders()
|
|
MimeHeaders(MimeParser parser)
|
|
| Method Summary | |
void |
dump(java.io.PrintStream out)
Dump all headers to the given stream. |
java.util.Enumeration |
enumerateHeaders()
Enumerate the headers defined by the holder. |
java.io.InputStream |
getInputStream()
Get the entity stream attached to these headers, if any. |
java.lang.String |
getValue(java.lang.String name)
Retreive a header value. |
boolean |
notifyBeginParsing(MimeParser parser)
The parsing is now about to start, take any appropriate action. |
void |
notifyEndParsing(MimeParser parser)
All the headers have been parsed, take any appropriate actions. |
void |
notifyHeader(java.lang.String name,
byte[] buf,
int off,
int len)
A new header has been parsed. |
void |
setValue(java.lang.String name,
java.lang.String value)
Set a header value. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public MimeHeaders(MimeParser parser)
public MimeHeaders()
| Method Detail |
public void notifyHeader(java.lang.String name,
byte[] buf,
int off,
int len)
throws MimeParserException
name - The name of the encountered header.buf - The byte buffer containing the value.off - Offset of the header value in the above buffer.len - Length of the value in the above header.
public boolean notifyBeginParsing(MimeParser parser)
throws java.io.IOException
This hack is primarily defined for HTTP/0.9 support, it might also be usefull for other hacks.
parser - The Mime parser.
public void notifyEndParsing(MimeParser parser)
throws java.io.IOException
parser - The Mime parser.
public void setValue(java.lang.String name,
java.lang.String value)
name - The header name.value - The header value.public java.lang.String getValue(java.lang.String name)
name - The name of the header.public java.util.Enumeration enumerateHeaders()
public java.io.InputStream getInputStream()
public void dump(java.io.PrintStream out)
out - The stream to dump to.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||