Class Attachment


  • public class Attachment
    extends Object
    Defines an attachment.

    Instances of this class are not thread-safe.

    • Constructor Detail

      • Attachment

        public Attachment​(String name,
                          File file,
                          String contentType)
        Creates a new Attachment. Disposition is set to attachment.
        Parameters:
        name - the name
        file - the file
        contentType - the content type
      • Attachment

        public Attachment​(String name,
                          File file,
                          String contentType,
                          String contentId)
        Creates a new Attachment. Disposition is set to inline.
        Parameters:
        name - the name
        file - the file
        contentType - the content type
        contentId - the content id
      • Attachment

        public Attachment​(String name,
                          byte[] data,
                          String contentType)
        Creates a new Attachment. Disposition is set to attachment.
        Parameters:
        name - the name
        data - the data
        contentType - the content type
      • Attachment

        public Attachment​(String name,
                          Flow.Publisher<Byte> data,
                          String contentType)
        Creates a new Attachment. Disposition is set to attachment.
        Parameters:
        name - the name
        data - the data as a stream of Byte
        contentType - the content type
      • Attachment

        public Attachment​(String name,
                          byte[] data,
                          String contentType,
                          String contentId)
        Creates a new Attachment. Disposition is set to inline.
        Parameters:
        name - the name
        data - the data
        contentType - the content type
        contentId - the content id
      • Attachment

        public Attachment​(String name,
                          Flow.Publisher<Byte> data,
                          String contentType,
                          String contentId)
        Creates a new Attachment. Disposition is set to inline.
        Parameters:
        name - the name
        data - the data as a stream of Byte
        contentType - the content type
        contentId - the content id
      • Attachment

        public Attachment​(String name,
                          byte[] data,
                          String contentType,
                          String description,
                          String disposition)
        Creates a new Attachment.
        Parameters:
        name - the name
        data - the data
        contentType - the content type
        description - the description
        disposition - the disposition
      • Attachment

        public Attachment​(String name,
                          Flow.Publisher<Byte> data,
                          String contentType,
                          String description,
                          String disposition)
        Creates a new Attachment.
        Parameters:
        name - the name
        data - the data as a stream of Byte
        contentType - the content type
        description - the description
        disposition - the disposition