Class 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
    • Method Detail

      • 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