1
2
3
4
5 package xjavadoc.filesystem;
6
7 import java.io.File;
8 import java.io.Reader;
9 import java.io.IOException;
10 import java.io.Writer;
11 import java.io.FileReader;
12 import java.io.FileWriter;
13 import java.io.OutputStream;
14 import java.io.FileOutputStream;
15 import java.io.FileNotFoundException;
16 import java.io.UnsupportedEncodingException;
17 import java.io.InputStreamReader;
18 import java.io.FileInputStream;
19
20 /***
21 * @created September 25, 2002
22 */
23 public class ReaderFile implements AbstractFile
24 {
25 private Reader file;
26
27 public ReaderFile( Reader file )
28 {
29 this.file = file;
30 }
31
32 public Reader getReader() throws IOException
33 {
34 return file;
35 }
36
37 public Reader getReader(String enc) throws UnsupportedEncodingException, FileNotFoundException
38 {
39
40
41
42
43
44
45
46
47
48 return file;
49 }
50
51 public Writer getWriter() throws IOException
52 {
53 throw new IOException("Not supported");
54 }
55
56 public boolean isWriteable()
57 {
58 return false;
59 }
60
61 public OutputStream getOutputStream() throws FileNotFoundException
62 {
63 throw new FileNotFoundException("Not supported");
64 }
65
66 public String getPath()
67 {
68 throw new RuntimeException("Not supported");
69 }
70
71 public long lastModified()
72 {
73 return Long.MIN_VALUE;
74 }
75
76 public String toString()
77 {
78 return super.toString();
79 }
80 }