class MailPart extends Object
Modifier and Type | Field and Description |
---|---|
Buffer |
buffer |
String |
charset
encoding non-null
|
String |
cid
encoding non-null
|
int |
decodedLength
the decoded length if known, else -1
|
String |
description
encoding non-null
|
String |
disposition
encoding non-null
|
String |
encoding
encoding non-null
|
String |
filename
fixme never set
|
String[] |
headerLines |
boolean |
message |
boolean |
multipart |
String |
multipart_type
encoding non-null
|
String |
name
encoding non-null
|
List<MailPart> |
parts |
String |
type
encoding non-null
|
String |
uidl
the UIDL of the mail, same for all parts
|
String |
version
encoding non-null
|
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() |
public final String[] headerLines
public final String type
public final String encoding
public final String name
public final String description
public final String disposition
public final String charset
public final String version
public final String multipart_type
public final String cid
public final String filename
public final boolean multipart
public final boolean message
public final Buffer buffer
public int decodedLength
public final String uidl
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 otherwiseIOException
public int getID()
public void decode(int offset, Buffer out) throws IOException
offset
- 2 for sendAttachment, 0 otherwise, probably for \r\nIOException
public void outputRaw(OutputStream out) throws IOException
IOException