01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/web/TKReadOnceFileInputStream.java,v 1.7 2001/02/21 18:24:41 alex Exp $
03: *
04: */
05: package com.teamkonzept.web;
06:
07: import java.io.*;
08:
09: /**
10: Das File wird gelˆscht, sobald der InputStream geschlossen wird
11: */
12: public class TKReadOnceFileInputStream extends FileInputStream {
13:
14: public File file;
15:
16: public TKReadOnceFileInputStream(String filename)
17: throws IOException {
18: this (new File(filename));
19: }
20:
21: public TKReadOnceFileInputStream(File file) throws IOException {
22: super (file);
23: this .file = file;
24: }
25:
26: public void close() throws IOException {
27: super .close();
28: file.delete(); // For debugging uncomment
29: }
30: }
|