class MailPart extends Object
Modifier and Type | Field and Description |
---|---|
Buffer |
buffer |
String |
charset |
int |
decodedLength
the decoded length if known, else -1
|
String |
description |
String |
disposition |
String |
encoding |
String |
filename
fixme never set
|
String[] |
headerLines |
boolean |
message |
boolean |
multipart |
String |
name |
List<MailPart> |
parts |
String |
type |
String |
uidl
the UIDL of the mail, same for all parts
|
String |
version |
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 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