|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.file.BaseFileObject
com.sun.tools.javac.file.RegularFileObject
class RegularFileObject
A subclass of JavaFileObject representing regular files.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.tools.JavaFileObject |
|---|
JavaFileObject.Kind |
| Field Summary | |
|---|---|
(package private) java.io.File |
f
|
private boolean |
hasParents
Have the parent directories been created? |
private java.lang.String |
name
|
| Fields inherited from class com.sun.tools.javac.file.BaseFileObject |
|---|
fileManager |
| Constructor Summary | |
|---|---|
RegularFileObject(JavacFileManager fileManager,
java.io.File f)
|
|
RegularFileObject(JavacFileManager fileManager,
java.lang.String name,
java.io.File f)
|
|
| Method Summary | |
|---|---|
boolean |
delete()
Deletes this file object. |
private void |
ensureParentDirectoriesExist()
|
boolean |
equals(java.lang.Object other)
|
java.nio.CharBuffer |
getCharContent(boolean ignoreEncodingErrors)
Gets the character content of this file object, if available. |
protected java.nio.charset.CharsetDecoder |
getDecoder(boolean ignoreEncodingErrors)
|
long |
getLastModified()
Gets the time this file object was last modified. |
java.lang.String |
getName()
Deprecated. |
java.lang.String |
getPath()
Deprecated. |
int |
hashCode()
|
protected java.lang.String |
inferBinaryName(java.lang.Iterable<? extends java.io.File> path)
|
boolean |
isNameCompatible(java.lang.String cn,
JavaFileObject.Kind kind)
Checks if this file object is compatible with the specified simple name and kind. |
java.io.InputStream |
openInputStream()
Gets an InputStream for this file object. |
java.io.OutputStream |
openOutputStream()
Gets an OutputStream for this file 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 com.sun.tools.javac.file.BaseFileObject |
|---|
getAccessLevel, getKind, getNestingKind, openReader, removeExtension, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean hasParents
private java.lang.String name
final java.io.File f
| Constructor Detail |
|---|
public RegularFileObject(JavacFileManager fileManager,
java.io.File f)
public RegularFileObject(JavacFileManager fileManager,
java.lang.String name,
java.io.File f)
| Method Detail |
|---|
public java.io.InputStream openInputStream()
throws java.io.IOException
FileObject
java.io.IOException - if an I/O error occurredprotected java.nio.charset.CharsetDecoder getDecoder(boolean ignoreEncodingErrors)
getDecoder in class BaseFileObject
public java.io.OutputStream openOutputStream()
throws java.io.IOException
FileObject
java.io.IOException - if an I/O error occurred
public java.io.Writer openWriter()
throws java.io.IOException
FileObject
java.io.IOException - if an I/O error occurredprotected java.lang.String inferBinaryName(java.lang.Iterable<? extends java.io.File> path)
inferBinaryName in class BaseFileObject
private void ensureParentDirectoriesExist()
throws java.io.IOException
java.io.IOException@Deprecated public 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 FileObjectgetName in class BaseFileObject
public boolean isNameCompatible(java.lang.String cn,
JavaFileObject.Kind kind)
JavaFileObject
cn - a simple name of a classkind - a kind
true if this file object is compatible; false
otherwise@Deprecated public java.lang.String getPath()
getPath in class BaseFileObjectpublic long getLastModified()
FileObject
public boolean delete()
FileObject
public java.nio.CharBuffer getCharContent(boolean ignoreEncodingErrors)
throws java.io.IOException
FileObjectignoreEncodingErrors is true.
ignoreEncodingErrors - ignore encoding errors if true
null otherwise
java.io.IOException - if an I/O error occurredpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.net.URI toUri()
FileObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||