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 BufferbufferStringcharsetintdecodedLengththe decoded length if known, else -1StringdescriptionStringdispositionStringencodingStringfilenamefixme never setString[]headerLinesbooleanmessagebooleanmultipartStringnameList<MailPart>partsStringtypeStringuidlthe UIDL of the mail, same for all partsStringversion -
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 voiddecode(int offset, Buffer out)Synched because FileBuffer keeps stream openintgetID()A value unique across all the parts of this Mail, and constant across restarts, so it may be part of a bookmark.voidoutputRaw(OutputStream out)Synched because FileBuffer keeps stream open Caller must close outStringtoString()
-
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
-