public static class ZipFileIndexArchive.ZipFileIndexFileObject extends BaseFileObject
BaseFileObject.CannotCreateUriError
JavaFileObject.Kind
fileManager
Modifier and Type | Method and Description |
---|---|
boolean |
delete()
Deletes this file object.
|
boolean |
equals(Object other)
Check if two file objects are equal.
|
CharBuffer |
getCharContent(boolean ignoreEncodingErrors)
Gets the character content of this file object, if available.
|
protected CharsetDecoder |
getDecoder(boolean ignoreEncodingErrors) |
JavaFileObject.Kind |
getKind()
Gets the kind of this file object.
|
long |
getLastModified()
Gets the time this file object was last modified.
|
String |
getName()
Gets a user-friendly name for this file object.
|
String |
getShortName()
Return a short name for the object, such as for use in raw diagnostics
|
int |
hashCode() |
protected String |
inferBinaryName(Iterable<? extends File> path) |
boolean |
isNameCompatible(String cn,
JavaFileObject.Kind k)
Checks if this file object is compatible with the specified
simple name and kind.
|
InputStream |
openInputStream()
Gets an InputStream for this file object.
|
OutputStream |
openOutputStream()
Gets an OutputStream for this file object.
|
Writer |
openWriter()
Gets a Writer for this file object.
|
URI |
toUri()
Returns a URI identifying this file object.
|
createJarUri, getAccessLevel, getKind, getNestingKind, getSimpleName, openReader, removeExtension, toString
public URI toUri()
FileObject
public 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
.public String getShortName()
BaseFileObject
getShortName
in class BaseFileObject
public JavaFileObject.Kind getKind()
JavaFileObject
public InputStream openInputStream() throws IOException
FileObject
IOException
- if an I/O error occurredpublic OutputStream openOutputStream() throws IOException
FileObject
IOException
- if an I/O error occurredpublic CharBuffer getCharContent(boolean ignoreEncodingErrors) throws IOException
FileObject
ignoreEncodingErrors
is true.ignoreEncodingErrors
- ignore encoding errors if truenull
otherwiseIOException
- if an I/O error occurredpublic Writer openWriter() throws IOException
FileObject
IOException
- if an I/O error occurredpublic long getLastModified()
FileObject
public boolean delete()
FileObject
protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors)
getDecoder
in class BaseFileObject
protected String inferBinaryName(Iterable<? extends File> path)
inferBinaryName
in class BaseFileObject
public boolean isNameCompatible(String cn, JavaFileObject.Kind k)
JavaFileObject
cn
- a simple name of a classk
- a kindtrue
if this file object is compatible; false
otherwisepublic boolean equals(Object other)
equals
in class BaseFileObject
public int hashCode()
hashCode
in class BaseFileObject
Copyright © 2015. All rights reserved.