|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.tools.ForwardingFileObject<F>
F - the kind of file object forwarded to by this objectpublic class ForwardingFileObject<F extends FileObject>
Forwards calls to a given file object. Subclasses of this class might override some of these methods and might also provide additional fields and methods.
| Field Summary | |
|---|---|
protected F |
fileObject
The file object which all methods are delegated to. |
| Constructor Summary | |
|---|---|
protected |
ForwardingFileObject(F fileObject)
Creates a new instance of ForwardingFileObject. |
| Method Summary | |
|---|---|
boolean |
delete()
Deletes this file object. |
java.lang.CharSequence |
getCharContent(boolean ignoreEncodingErrors)
Gets the character content of this file object, if available. |
long |
getLastModified()
Gets the time this file object was last modified. |
java.lang.String |
getName()
Gets a user-friendly name for this file object. |
java.io.InputStream |
openInputStream()
Gets an InputStream for this file object. |
java.io.OutputStream |
openOutputStream()
Gets an OutputStream for this file object. |
java.io.Reader |
openReader(boolean ignoreEncodingErrors)
Gets a reader for this object. |
java.io.Writer |
openWriter()
Gets a Writer for this file object. |
java.net.URI |
toUri()
Returns a URI identifying this file object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final F extends FileObject fileObject
| Constructor Detail |
|---|
protected ForwardingFileObject(F fileObject)
fileObject - delegate to this file object| Method Detail |
|---|
public java.net.URI toUri()
FileObject
toUri in interface FileObjectpublic java.lang.String getName()
FileObject"BobsApp\Test.java" on
the command line, this method should return "BobsApp\Test.java" whereas the toUri
method might return file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java.
getName in interface FileObject
public java.io.InputStream openInputStream()
throws java.io.IOException
FileObject
openInputStream in interface FileObjectjava.lang.IllegalStateException - if this file object was
opened for writing and does not support reading
java.lang.UnsupportedOperationException - if this kind of file
object does not support byte access
java.io.IOException - if an I/O error occurred
public java.io.OutputStream openOutputStream()
throws java.io.IOException
FileObject
openOutputStream in interface FileObjectjava.lang.IllegalStateException - if this file object was
opened for reading and does not support writing
java.lang.UnsupportedOperationException - if this kind of
file object does not support byte access
java.io.IOException - if an I/O error occurred
public java.io.Reader openReader(boolean ignoreEncodingErrors)
throws java.io.IOException
FileObjectignoreEncodingErrors is true.
openReader in interface FileObjectignoreEncodingErrors - ignore encoding errors if true
java.lang.IllegalStateException - if this file object was
opened for writing and does not support reading
java.lang.UnsupportedOperationException - if this kind of
file object does not support character access
java.io.IOException - if an I/O error occurred
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors)
throws java.io.IOException
FileObjectignoreEncodingErrors is true.
getCharContent in interface FileObjectignoreEncodingErrors - ignore encoding errors if true
null otherwise
java.lang.IllegalStateException - if this file object was
opened for writing and does not support reading
java.lang.UnsupportedOperationException - if this kind of
file object does not support character access
java.io.IOException - if an I/O error occurred
public java.io.Writer openWriter()
throws java.io.IOException
FileObject
openWriter in interface FileObjectjava.lang.IllegalStateException - if this file object was
opened for reading and does not support writing
java.lang.UnsupportedOperationException - if this kind of
file object does not support character access
java.io.IOException - if an I/O error occurredpublic long getLastModified()
FileObject
getLastModified in interface FileObjectpublic boolean delete()
FileObject
delete in interface FileObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||