Class FileContentFactory

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

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

    • FileContentFactory

      public FileContentFactory(File input)
      Constructs a new FileContentFactory with a given input file
      Parameters:
      input - the input file
  • 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