|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FileInputStream
org.tranche.streams.DeleteFileOnExitFileInputStream
public class DeleteFileOnExitFileInputStream
A helper class that extends FileOutputStream and automatically deletes the file that it is reading once the close() method is invoked.
| Constructor Summary | |
|---|---|
DeleteFileOnExitFileInputStream(java.io.File file)
Creates a new FileOutputStream that uses the File specified to read from. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the parent FileOutputStream then deletes the file that was read from. |
| Methods inherited from class java.io.FileInputStream |
|---|
available, 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 |
|---|
public DeleteFileOnExitFileInputStream(java.io.File file)
throws java.io.FileNotFoundException
Creates a new FileOutputStream that uses the File specified to read from. When this object is closed it will automatically delete the underlying file.
file - The File to read from.
java.io.FileNotFoundException - If the specified file does not exist.| Method Detail |
|---|
public void close()
throws java.io.IOException
Closes the parent FileOutputStream then deletes the file that was read from.
close in interface java.io.Closeableclose in class java.io.FileInputStreamjava.io.IOException - Should any IOException occur.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||