|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.www.mime.MimeParser
public class MimeParser
The MimeParser class parses an input MIME stream.
Field Summary | |
---|---|
protected int |
bsize
|
protected byte[] |
buffer
|
protected int |
ch
|
protected MimeParserFactory |
factory
The factory used to create new MIME header holders. |
protected java.io.InputStream |
input
|
Constructor Summary | |
---|---|
MimeParser(java.io.InputStream input,
MimeParserFactory factory)
Create an instance of the MIMEParser class. |
Method Summary | |
---|---|
protected void |
append(int c)
|
protected void |
expect(int car)
|
java.io.InputStream |
getInputStream()
Get the message body, as an input stream. |
static void |
main(java.lang.String[] args)
Debuging |
MimeHeaderHolder |
parse()
parse the stream, and create a MimeHeaderHolder containing all the parsed headers, in lenient mode Always be lenient by default (general rule is: be lenient in what you accept conservative with what you generate). |
MimeHeaderHolder |
parse(boolean lenient)
parse the stream, and create a MimeHeaderHolder containing all the parsed headers, note that invalid headers will trigger an exception in stirct mode, and will just be removed in lenient mode |
protected void |
parse822HeaderBody()
|
protected void |
parse822HeaderBody(boolean lenient)
|
protected void |
parse822HeaderBodyLenient()
|
protected void |
parse822HeaderBodyStrict()
|
protected java.lang.String |
parse822HeaderName()
|
protected void |
parse822Headers(MimeHeaderHolder msg)
|
protected void |
parse822Headers(MimeHeaderHolder msg,
boolean lenient)
|
protected java.lang.String |
parseToken(boolean lower)
|
int |
read()
|
protected void |
skipSpaces()
|
void |
unread(int ch)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int ch
protected java.io.InputStream input
protected byte[] buffer
protected int bsize
protected MimeParserFactory factory
Constructor Detail |
---|
public MimeParser(java.io.InputStream input, MimeParserFactory factory)
in
- The input stream to be parsed as a MIME stream.factory
- The factory used to create MIME header holders.Method Detail |
---|
protected void expect(int car) throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void skipSpaces() throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected final void append(int c)
protected java.lang.String parse822HeaderName() throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void parse822HeaderBody() throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void parse822HeaderBodyLenient() throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void parse822HeaderBody(boolean lenient) throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void parse822HeaderBodyStrict() throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected java.lang.String parseToken(boolean lower) throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void parse822Headers(MimeHeaderHolder msg, boolean lenient) throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
protected void parse822Headers(MimeHeaderHolder msg) throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
public MimeHeaderHolder parse(boolean lenient) throws MimeParserException, java.io.IOException
lenient,
- a boolean, true if we want to be kind with bad people
MimeParserException
java.io.IOException
public MimeHeaderHolder parse() throws MimeParserException, java.io.IOException
MimeParserException
java.io.IOException
public int read() throws java.io.IOException
java.io.IOException
public void unread(int ch)
public java.io.InputStream getInputStream()
parse
, this input stream contains exactly
the body of the message.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |