class MailPart extends Object
| Modifier and Type | Field and Description |
|---|---|
Buffer | bufferbuffer. |
String | charsetcharset. |
String | cidcid. |
int | decodedLengththe decoded length if known, else -1 |
String | descriptiondescription. |
String | dispositiondisposition. |
String | encodingencoding. |
String | filenameAlways null, reserved for future use |
String[] | headerLinesheaderLines. |
boolean | messagemessage. |
boolean | multipartmultipart. |
String | multipart_typemultipart_type. |
String | namename. |
List<MailPart> | partsparts. |
String | typeencoding non-null |
String | uidlthe UIDL of the mail, same for all parts |
String | versionversion. |
| Constructor and Description |
|---|
MailPart(String uidl,
AtomicInteger id,
Buffer readBuffer,
InputStream in,
ReadCounter counter,
String[] hdrlines) |
| Modifier and Type | Method and Description |
|---|---|
void | decode(int offset,
Buffer out)Synched because FileBuffer keeps stream open |
int | getID()A value unique across all the parts of this Mail,
and constant across restarts, so it may be part of a bookmark. |
void | outputRaw(OutputStream out)Synched because FileBuffer keeps stream open
Caller must close out |
String | toString()toString. |
public final Buffer buffer
public final String charset
public final String cid
public int decodedLength
public final String description
public final String disposition
public final String encoding
public final String filename
public final String[] headerLines
public final boolean message
public final boolean multipart
public final String multipart_type
public final String name
public final String type
public final String uidl
public final String version
public MailPart(String uidl, AtomicInteger id, Buffer readBuffer, InputStream in, ReadCounter counter, String[] hdrlines) throws IOException
readBuffer - has zero offset for top-level MailPart.in - used for reading (NOT readBuffer.getInputStream())counter - used for counting how much we have read.
Probably the same as InputStream but a different interface.hdrlines - non-null for top-level MailPart, where they
were already parsed in Mail. Null otherwiseIOExceptionpublic void decode(int offset,
Buffer out)
throws IOExceptionoffset - 2 for sendAttachment, 0 otherwise, probably for \r\nIOExceptionpublic int getID()
public void outputRaw(OutputStream out) throws IOException
IOException