Interface AttachmentDataSource

  • All Superinterfaces:
    javax.activation.DataSource, com.novomind.ecom.common.api.attribute.Named, com.novomind.ecom.common.api.io.datasource.SizedDataSource
    All Known Subinterfaces:
    MessageAttachmentDataSource

    public interface AttachmentDataSource
    extends com.novomind.ecom.common.api.io.datasource.SizedDataSource, com.novomind.ecom.common.api.attribute.Named
    An AttachmentDataSource provides information and access to the binary data of an attachment.
    Since:
    10.0.38
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()  
      default java.io.OutputStream getOutputStream()
      This method maybe unsupported and throws a RuntimeException
      • Methods inherited from interface javax.activation.DataSource

        getContentType, getName
      • Methods inherited from interface com.novomind.ecom.common.api.attribute.Named

        getName
      • Methods inherited from interface com.novomind.ecom.common.api.io.datasource.SizedDataSource

        getSize
    • Method Detail

      • getInputStream

        java.io.InputStream getInputStream()
                                    throws AttachmentIOException
        Specified by:
        getInputStream in interface javax.activation.DataSource
        Returns:
        InputStream - the binary attachment data
        Throws:
        AttachmentIOException - if an error occurred on accessing the attachment
        Since:
        10.0.38
      • getOutputStream

        default java.io.OutputStream getOutputStream()
                                              throws java.io.IOException
        This method maybe unsupported and throws a RuntimeException
        Specified by:
        getOutputStream in interface javax.activation.DataSource
        Returns:
        OutputStream - OutputStream to write the attachment binary data
        Throws:
        java.io.IOException - if an error occurred on writing the attachment data
        Since:
        10.0.38