Class DetailedFileInputStream
java.lang.Object
java.io.InputStream
java.io.FileInputStream
edu.ucsb.nceas.metacat.restservice.multipart.DetailedFileInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
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
ConstructorDescriptionDetailedFileInputStream
(File file, org.dataone.service.types.v1.Checksum expectedChecksum) Constructor -
Method Summary
Modifier and TypeMethodDescriptionorg.dataone.service.types.v1.Checksum
Get the expected checksum of the source filegetFile()
Get the source fileMethods inherited from class java.io.FileInputStream
available, close, getChannel, getFD, read, read, read, readAllBytes, readNBytes, skip
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readNBytes, reset, skipNBytes, transferTo
-
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 fromexpectedChecksum
- 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
Get the source file- Returns:
- the source file object
-