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
All Methods Instance Methods Concrete Methods 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 Detail
-
headerLines
public final String[] headerLines
-
type
public final String type
-
encoding
public final String encoding
-
name
public final String name
-
description
public final String description
-
disposition
public final String disposition
-
charset
public final String charset
-
version
public final String version
-
filename
public final String filename
fixme never set
-
multipart
public final boolean multipart
-
message
public final boolean message
-
buffer
public final Buffer buffer
-
decodedLength
public int decodedLength
the decoded length if known, else -1- Since:
- 0.9.34
-
uidl
public final String uidl
the UIDL of the mail, same for all parts- Since:
- 0.9.33
-
-
Constructor Detail
-
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 Detail
-
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
public void decode(int offset, Buffer out) throws IOExceptionSynched because FileBuffer keeps stream open- Parameters:
offset- 2 for sendAttachment, 0 otherwise, probably for \r\n- Throws:
IOException- Since:
- 0.9.13
-
outputRaw
public void outputRaw(OutputStream out) throws IOException
Synched because FileBuffer keeps stream open Caller must close out- Throws:
IOException- Since:
- 0.9.35
-
-