edu.ucsb.nceas.metacat.restservice.multipart

## Class DetailedFileInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FileInputStream
    - - edu.ucsb.nceas.metacat.restservice.multipart.DetailedFileInputStream

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

      public class DetailedFileInputStream
      extends java.io.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 Summary

    Constructors
    Constructor and Description
    `DetailedFileInputStream(java.io.File file, org.dataone.service.types.v1.Checksum expectedChecksum)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.dataone.service.types.v1.Checksum` | `getExpectedChecksum()` Get the expected checksum of the source file
    `java.io.File` | `getFile()` Get the source file

    - ### Methods inherited from class java.io.FileInputStream

      `available, close, finalize, getChannel, getFD, read, read, read, skip`

    - ### Methods inherited from class java.io.InputStream

      `mark, markSupported, reset`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DetailedFileInputStream

          public DetailedFileInputStream(java.io.File file,
                                         org.dataone.service.types.v1.Checksum expectedChecksum)
                                  throws java.io.FileNotFoundException

      Constructor
      Parameters:
        `file` - the source file where the input stream comes from
        `expectedChecksum` - the expected checksum of the source file
      Throws:
        `java.io.FileNotFoundException`

  - ### Method Detail

    - #### 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 java.io.File getFile()

      Get the source file
      Returns:
        the source file object

Copyright © 2023 Regents of the University of California. All Rights Reserved.