1 7 8 package javax.tools; 9 10 import java.io.IOException ; 11 import java.io.InputStream ; 12 import java.io.OutputStream ; 13 import java.io.Reader ; 14 import java.io.Writer ; 15 import java.net.URI ; 16 17 26 public class ForwardingFileObject<F extends FileObject> implements FileObject { 27 28 31 protected final F fileObject; 32 33 37 protected ForwardingFileObject(F fileObject) { 38 fileObject.getClass(); this.fileObject = fileObject; 40 } 41 42 public URI toUri() { 43 return fileObject.toUri(); 44 } 45 46 public String getName() { 47 return fileObject.getName(); 48 } 49 50 55 public InputStream openInputStream() throws IOException { 56 return fileObject.openInputStream(); 57 } 58 59 64 public OutputStream openOutputStream() throws IOException { 65 return fileObject.openOutputStream(); 66 } 67 68 73 public Reader openReader(boolean ignoreEncodingErrors) throws IOException { 74 return fileObject.openReader(ignoreEncodingErrors); 75 } 76 77 82 public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { 83 return fileObject.getCharContent(ignoreEncodingErrors); 84 } 85 86 91 public Writer openWriter() throws IOException { 92 return fileObject.openWriter(); 93 } 94 95 public long getLastModified() { 96 return fileObject.getLastModified(); 97 } 98 99 public boolean delete() { 100 return fileObject.delete(); 101 } 102 } 103 | Popular Tags |