Class ByteArrayDataSource

java.lang.Object
com.helger.mail.datasource.ByteArrayDataSource
All Implemented Interfaces:
IExtendedDataSource, jakarta.activation.DataSource

public class ByteArrayDataSource extends Object implements IExtendedDataSource
A DataSource implementation based on a byte array
Author:
Philip Helger
  • Constructor Details

  • Method Details

    • directGetBytes

      @Nonnull @ReturnsMutableObject public byte[] directGetBytes()
    • getInputStream

      @Nonnull public com.helger.commons.io.stream.NonBlockingByteArrayInputStream getInputStream()
      Specified by:
      getInputStream in interface jakarta.activation.DataSource
    • getOutputStream

      @Nonnull public com.helger.commons.io.stream.NonBlockingByteArrayOutputStream getOutputStream() throws IOException
      Specified by:
      getOutputStream in interface jakarta.activation.DataSource
      Throws:
      IOException
    • getContentType

      @Nonnull public String getContentType()
      Specified by:
      getContentType in interface jakarta.activation.DataSource
    • getName

      @Nullable public String getName()
      Specified by:
      getName in interface jakarta.activation.DataSource
    • toString

      public String toString()
      Overrides:
      toString in class Object