Class DetailedFileInputStream

java.lang.Object
java.io.InputStream
java.io.FileInputStream
edu.ucsb.nceas.metacat.restservice.multipart.DetailedFileInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class DetailedFileInputStream extends FileInputStream
A FileInputStream class with more information, such as the object of source file itself and the expected checksum of the source file.
Author:
tao
  • Constructor Details

    • DetailedFileInputStream

      public DetailedFileInputStream(File file, org.dataone.service.types.v1.Checksum expectedChecksum) throws FileNotFoundException
      Constructor
      Parameters:
      file - the source file where the input stream comes from
      expectedChecksum - the expected checksum of the source file
      Throws:
      FileNotFoundException
  • Method Details

    • getExpectedChecksum

      public org.dataone.service.types.v1.Checksum getExpectedChecksum()
      Get the expected checksum of the source file
      Returns:
      the checksum of the source file
    • getFile

      public File getFile()
      Get the source file
      Returns:
      the source file object