All Packages This Package Class Hierarchy Class Search Index
Class grendel.mime.parser.MimeDwimText
java.lang.Object | +----grendel.mime.parser.MimeObject | +----grendel.mime.parser.MimeContainer | +----grendel.mime.parser.MimeDwimText
This class implements a parser for untyped message contents, that is, it is the class used for the body of a message/rfc822 object which had no Content-Type header, as opposed to an unrecognized content-type. Such a message, technically, does not contain MIME data (it follows only RFC 822, not RFC 1521.)
This is a container class, and the reason for that is that it loosely parses the body of the message looking for ``sub-parts'' and then creates appropriate containers for them.
More specifically, it looks for uuencoded and BinHexed data. It may do more than that some day. (DWIM stands for ``Do What I Mean.'')
See Also: MimeMultipart, MimeXSunAttachment
class MimeDwimText extends grendel.mime.parser.MimeContainer { // Fields 9 private static final int BINHEX; private static final int TEXT; private static final int UUE; ByteLineBuffer line_buffer; ByteBuf line_bytes; String subpart_encoding; String subpart_name; String subpart_type; int type; // Constructors 1 public MimeDwimText(String, InternetHeaders); // Methods 9 boolean binhex_begin_line_p(byte[], int); boolean binhex_end_line_p(byte[], int); String name_to_content_type(String); void open_untyped_child(); void process_line(ByteBuf); public void pushBytes(ByteBuf); public void pushEOF(); boolean uue_begin_line_p(byte[], int); boolean uue_end_line_p(byte[], int); }
Fields
line_buffer
ByteLineBuffer line_buffer
line_bytes
ByteBuf line_bytes
TEXT
private static final int TEXT
UUE
private static final int UUE
BINHEX
private static final int BINHEX
type
int type
subpart_name
String subpart_name
subpart_type
String subpart_type
subpart_encoding
String subpart_encoding
Constructors
MimeDwimText
public MimeDwimText(String content_type, InternetHeaders headers)
Methods
pushBytes
public void pushBytes(ByteBuf bytes)
Buffers the bytes into lines, and calls process_line() on each line.
- Overrides:
- pushBytes in class MimeObject
pushEOF
public void pushEOF()
Flushes the line buffer, and (maybe) calls process_line() one last time.
- Overrides:
- pushEOF in class MimeContainer
process_line
void process_line(ByteBuf line_buf)
Called for each line of this part.
open_untyped_child
void open_untyped_child()
uue_begin_line_p
boolean uue_begin_line_p(byte[] line, int length)
uue_end_line_p
boolean uue_end_line_p(byte[] line, int length)
binhex_begin_line_p
boolean binhex_begin_line_p(byte[] line, int length)
binhex_end_line_p
boolean binhex_end_line_p(byte[] line, int length)
name_to_content_type
String name_to_content_type(String filename)
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4