Class ByteArrayDataSource

java.lang.Object
fr.paris.lutece.util.mail.ByteArrayDataSource
All Implemented Interfaces:
Serializable, javax.activation.DataSource

public class ByteArrayDataSource extends Object implements javax.activation.DataSource, Serializable
This class is used by MailUtil.
See Also:
  • Constructor Details

    • ByteArrayDataSource

      public ByteArrayDataSource(String data, String type)
      Creates a new ByteArrayDataSource object.
      Parameters:
      data - The data
      type - The parameters
    • ByteArrayDataSource

      public ByteArrayDataSource(byte[] data, String type)
      Creates a new ByteArrayDataSource object.
      Parameters:
      data - The data
      type - The parameters
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface javax.activation.DataSource
      Returns:
      The input stream
      Throws:
      IOException - The IO exception
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Specified by:
      getOutputStream in interface javax.activation.DataSource
      Returns:
      The output stream
      Throws:
      IOException - The IO exception
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface javax.activation.DataSource
      Returns:
      The content type
    • getName

      public String getName()
      Specified by:
      getName in interface javax.activation.DataSource
      Returns:
      The Name