Class EmailServices.ByteArrayDataSource

  • All Implemented Interfaces:
    javax.activation.DataSource
    Enclosing class:
    EmailServices

    public static class EmailServices.ByteArrayDataSource
    extends java.lang.Object
    implements javax.activation.DataSource
    class to create a file in memory required for sending as an attachment
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteArrayDataSource​(byte[] content, java.lang.String contentType)  
    • Constructor Detail

      • ByteArrayDataSource

        public ByteArrayDataSource​(byte[] content,
                                   java.lang.String contentType)
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        Specified by:
        getContentType in interface javax.activation.DataSource
      • getInputStream

        public java.io.InputStream getInputStream()
        Specified by:
        getInputStream in interface javax.activation.DataSource
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface javax.activation.DataSource
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Specified by:
        getOutputStream in interface javax.activation.DataSource
        Throws:
        java.io.IOException