- java.lang.Object
-
- java.io.InputStream
-
- java.io.FileInputStream
-
- net.pincette.io.DeleteFileInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class DeleteFileInputStream extends FileInputStream
Deletes the file after the stream has been closed, which is interesting when working with temporary files.- Author:
- Werner Donné
-
-
Constructor Summary
Constructors Constructor Description DeleteFileInputStream(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-
Methods inherited from class java.io.FileInputStream
available, finalize, getChannel, getFD, read, read, read, skip
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
Constructor Detail
-
DeleteFileInputStream
public DeleteFileInputStream(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFileInputStream
- Throws:
IOException
-
-