Package javax.mail

Interface MultipartDataSource

  • All Superinterfaces:
    javax.activation.DataSource
    All Known Implementing Classes:
    IMAPMultipartDataSource

    public interface MultipartDataSource
    extends javax.activation.DataSource
    A data source that contains body parts.
    Version:
    1.4
    Author:
    Chris Burdess
    See Also:
    DataSource
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      BodyPart getBodyPart​(int index)
      Returns the specified body part.
      int getCount()
      Returns the number of body parts.
      • Methods inherited from interface javax.activation.DataSource

        getContentType, getInputStream, getName, getOutputStream
    • Method Detail

      • getCount

        int getCount()
        Returns the number of body parts.
      • getBodyPart

        BodyPart getBodyPart​(int index)
                      throws MessagingException
        Returns the specified body part. Body parts are numbered starting at 0.
        Parameters:
        index - the index of the desired body part
        Throws:
        java.lang.IndexOutOfBoundsException - if the given index is out of range
        MessagingException