Class ByteArrayContentFactory

java.lang.Object
org.kopi.ebics.io.ByteArrayContentFactory
All Implemented Interfaces:
Serializable, ContentFactory

public class ByteArrayContentFactory extends Object implements ContentFactory
Byte array content factory that delivers the file content as a ByteArrayInputStream. This object is serializable in a way to recover interrupted file transfers.
See Also:
  • Constructor Details

    • ByteArrayContentFactory

      public ByteArrayContentFactory(byte[] content)
      Constructs a new ByteArrayContentFactory with a given byte array content.
      Parameters:
      content - the byte array content
  • Method Details

    • getContent

      public InputStream getContent() throws IOException
      Description copied from interface: ContentFactory
      Returns a new data source of the data to be sent. The instance must ensure that the returned stream will deliver the identical data during the lifetime of this instance. Nevertheless, how often the method will be called.
      Specified by:
      getContent in interface ContentFactory
      Returns:
      a new data source of the data to be sent.
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object