Class MimeUtil.ByteArrayDataSource

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

    public static class MimeUtil.ByteArrayDataSource
    extends java.lang.Object
    implements javax.activation.DataSource
    data source for binary files
    • Constructor Detail

      • ByteArrayDataSource

        public ByteArrayDataSource​(ByteArrayIOStream _ioStream,
                                   java.lang.String _contentType)
        create a data source from a byte array
        Parameters:
        _ioStream - the ByteArrayIOStream to use
        _contentType - the content type of the contents
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        * (non-Javadoc)
        Specified by:
        getContentType in interface javax.activation.DataSource
        See Also:
        DataSource.getContentType()
      • getInputStream

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

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

        public java.io.OutputStream getOutputStream()
        Specified by:
        getOutputStream in interface javax.activation.DataSource
        See Also:
        DataSource.getOutputStream()