KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > web > TKReadOnceFileInputStream


1 /*
2  * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/web/TKReadOnceFileInputStream.java,v 1.7 2001/02/21 18:24:41 alex Exp $
3  *
4  */

5 package com.teamkonzept.web;
6
7 import java.io.*;
8
9 /**
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 JavaDoc filename )
17         throws IOException
18     {
19         this( new File( filename ) );
20     }
21     
22     public TKReadOnceFileInputStream( File file )
23         throws IOException
24     {
25         super( file );
26         this.file = file;
27     }
28     
29     public void close()
30         throws IOException
31     {
32         super.close();
33         file.delete(); // For debugging uncomment
34
}
35 }
36
37
Popular Tags