Package i2p.susi.webmail
Class MailPart
java.lang.Object
i2p.susi.webmail.MailPart
class MailPart extends Object
- Author:
- susi23
-
Field Summary
Fields Modifier and Type Field Description Buffer
buffer
String
charset
int
decodedLength
the decoded length if known, else -1String
description
String
disposition
String
encoding
String
filename
fixme never setString[]
headerLines
boolean
message
boolean
multipart
String
name
List<MailPart>
parts
String
type
String
uidl
the UIDL of the mail, same for all partsString
version
-
Constructor Summary
Constructors Constructor Description MailPart(String uidl, AtomicInteger id, Buffer readBuffer, InputStream in, ReadCounter counter, String[] hdrlines)
-
Method Summary
Modifier and Type Method Description void
decode(int offset, Buffer out)
Synched because FileBuffer keeps stream openint
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 outString
toString()
-
Field Details
-
headerLines
-
type
-
encoding
-
name
-
description
-
disposition
-
charset
-
version
-
filename
fixme never set -
parts
-
multipart
public final boolean multipart -
message
public final boolean message -
buffer
-
decodedLength
public int decodedLengththe decoded length if known, else -1- Since:
- 0.9.34
-
uidl
the UIDL of the mail, same for all parts- Since:
- 0.9.33
-
-
Constructor Details
-
MailPart
public MailPart(String uidl, AtomicInteger id, Buffer readBuffer, InputStream in, ReadCounter counter, String[] hdrlines) throws IOException- Parameters:
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 otherwise- Throws:
IOException
-
-
Method Details
-
getID
public int getID()A value unique across all the parts of this Mail, and constant across restarts, so it may be part of a bookmark.- Since:
- 0.9.34
-
decode
Synched because FileBuffer keeps stream open- Parameters:
offset
- 2 for sendAttachment, 0 otherwise, probably for \r\n- Throws:
IOException
- Since:
- 0.9.13
-
outputRaw
Synched because FileBuffer keeps stream open Caller must close out- Throws:
IOException
- Since:
- 0.9.35
-
toString
-