Class Multipart


  • public class Multipart
    extends java.lang.Object
    Multipart is a container that holds multiple body parts.
    Since:
    TotalCross 1.13
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FORM_DATA  
      static java.lang.String MIXED  
      protected Vector parts
      List of parts contained in this container
      protected java.lang.String subType  
    • Constructor Summary

      Constructors 
      Constructor Description
      Multipart()  
      Multipart​(java.lang.String subType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPart​(Part part)
      Adds a MIME body part to this part container.
      void writeTo​(Stream stream)
      Output an appropriately encoded bytestream to the given stream, which is typically used for sending.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • parts

        protected Vector parts
        List of parts contained in this container
      • subType

        protected java.lang.String subType
    • Constructor Detail

      • Multipart

        public Multipart()
      • Multipart

        public Multipart​(java.lang.String subType)
    • Method Detail

      • addPart

        public void addPart​(Part part)
        Adds a MIME body part to this part container.
        Parameters:
        part - part to be added to this part container.
        Since:
        TotalCross 1.13
      • writeTo

        public void writeTo​(Stream stream)
                     throws IOException,
                            MessagingException
        Output an appropriately encoded bytestream to the given stream, which is typically used for sending.
        Parameters:
        stream - the output stream that will receive the encoded bytestream
        Throws:
        IOException - if an IO related exception occurs
        MessagingException - if an error occurs fetching the data to be written
        Since:
        TotalCross 1.13