Home » openjdk-7 » javax » tools » [javadoc | source]
javax.tools
public interface: FileObject [javadoc | source]

All Known Implementing Classes:
    SimpleJavaFileObject, ForwardingFileObject, JavaFileObject, ForwardingJavaFileObject

File abstraction for tools. In this context, file means an abstraction of regular files and other sources of data. For example, a file object can be used to represent regular files, memory cache, or data in databases.

All methods in this interface might throw a SecurityException if a security exception occurs.

Unless explicitly allowed, all methods in this interface might throw a NullPointerException if given a {@code null} argument.

Method from javax.tools.FileObject Summary:
delete,   getCharContent,   getLastModified,   getName,   openInputStream,   openOutputStream,   openReader,   openWriter,   toUri
Method from javax.tools.FileObject Detail:
 public boolean delete()
    Deletes this file object. In case of errors, returns false.
 public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException
    Gets the character content of this file object, if available. Any byte that cannot be decoded will be replaced by the default translation character. In addition, a diagnostic may be reported unless {@code ignoreEncodingErrors} is true.
 public long getLastModified()
    Gets the time this file object was last modified. The time is measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
 public String getName()
    Gets a user-friendly name for this file object. The exact value returned is not specified but implementations should take care to preserve names as given by the user. For example, if the user writes the filename {@code "BobsApp\Test.java"} on the command line, this method should return {@code "BobsApp\Test.java"} whereas the {@linkplain #toUri toUri} method might return {@code file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java}.
 public InputStream openInputStream() throws IOException
    Gets an InputStream for this file object.
 public OutputStream openOutputStream() throws IOException
    Gets an OutputStream for this file object.
 public Reader openReader(boolean ignoreEncodingErrors) throws IOException
    Gets a reader for this object. The returned reader will replace bytes that cannot be decoded with the default translation character. In addition, the reader may report a diagnostic unless {@code ignoreEncodingErrors} is true.
 public Writer openWriter() throws IOException
    Gets a Writer for this file object.
 public URI toUri()
    Returns a URI identifying this file object.