Package org.dspace.storage.bitstore
Class DeleteOnCloseFileInputStream
java.lang.Object
java.io.InputStream
java.io.FileInputStream
org.dspace.storage.bitstore.DeleteOnCloseFileInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
When inputstream closes, then delete the file
http://stackoverflow.com/a/4694155/368581
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FileInputStream
available, getChannel, getFD, read, read, read, readAllBytes, readNBytes, skipMethods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
DeleteOnCloseFileInputStream
- Throws:
FileNotFoundException
-
DeleteOnCloseFileInputStream
- Throws:
FileNotFoundException
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFileInputStream- Throws:
IOException
-