org.w3c.www.mime
Interface MimeHeaderHolder
- All Known Implementing Classes:
- HttpMessage, MimeHeaders
- public interface MimeHeaderHolder
Method Summary |
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. |
notifyHeader
public void notifyHeader(java.lang.String name,
byte[] buf,
int off,
int len)
throws MimeParserException
- A new header has been parsed.
- Parameters:
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.- Throws:
- MimeParserException - if the parsing failed
notifyBeginParsing
public boolean notifyBeginParsing(MimeParser parser)
throws MimeParserException,
java.io.IOException
- The parsing is now about to start, take any appropriate action.
This hook can return a true boolean value to enforce
the MIME parser into transparent mode (eg the parser will not
try to parse any headers.
This hack is primarily defined for HTTP/0.9 support, it might
also be usefull for other hacks.
- Parameters:
parser
- The Mime parser.- Returns:
- A boolean true if the MimeParser shouldn't
continue the parsing, false otherwise.
- Throws:
- MimeParserException - if the parsing failed
- java.io.IOException - if an IO error occurs.
notifyEndParsing
public void notifyEndParsing(MimeParser parser)
throws MimeParserException,
java.io.IOException
- All the headers have been parsed, take any appropriate actions.
- Parameters:
parser
- The Mime parser.- Throws:
- MimeParserException - if the parsing failed
- java.io.IOException - if an IO error occurs.