Class MailPart

java.lang.Object
i2p.susi.webmail.MailPart

class MailPart extends Object
Author:
susi23
  • Field Details

    • 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
    • parts

      public final List<MailPart> parts
    • 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 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

      public void decode(int offset, Buffer out) throws IOException
      Synched 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
    • toString

      public String toString()
      Overrides:
      toString in class Object