Class StandardDocFileFactory.StandardDocFile
java.lang.Object
gw.gosudoc.com.sun.tools.doclets.internal.toolkit.util.DocFile
gw.gosudoc.com.sun.tools.doclets.internal.toolkit.util.StandardDocFileFactory.StandardDocFile
- Enclosing class:
- StandardDocFileFactory
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
StandardDocFile
(Path file) Create a StandardDocFile for a given file.private
StandardDocFile
(JavaFileManager.Location location, DocPath path) Create a StandardDocFile for a given location and relative path. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRead()
Return true if the file can be read.boolean
canWrite()
Return true if the file can be written.boolean
exists()
Return true if the file exists.private FileObject
private JavaFileObject
getName()
Return the base name (last component) of the file name.getPath()
Return the file system path for this file.boolean
Return true is file has an absolute path name.boolean
Return true is file identifies a directory.boolean
isFile()
Return true is file identifies a file.boolean
isSameFile
(DocFile other) Return true if this file is the same as another.list()
If the file is a directory, list its contents.boolean
mkdirs()
Create the file as a directory, including any parent directories.Open an input stream for the file.Open an output stream for the file.Open an writer for the file, using the encoding (if any) given in the doclet configuration.Derive a new file by resolving a relative path against this file.Derive a new file by resolving a relative path against this file.Resolve a relative file against the given output location.toString()
Return a string to identify the contents of this object, for debugging purposes.Methods inherited from class gw.gosudoc.com.sun.tools.doclets.internal.toolkit.util.DocFile
copyFile, copyResource, createFileForDirectory, createFileForInput, createFileForOutput, list
-
Field Details
-
file
-
-
Constructor Details
-
StandardDocFile
Create a StandardDocFile for a given file. -
StandardDocFile
Create a StandardDocFile for a given location and relative path.
-
-
Method Details
-
openInputStream
Open an input stream for the file.- Specified by:
openInputStream
in classDocFile
- Throws:
IOException
-
openOutputStream
Open an output stream for the file. The file must have been created with a location ofDocumentationTool.Location.DOCUMENTATION_OUTPUT
and a corresponding relative path.- Specified by:
openOutputStream
in classDocFile
- Throws:
IOException
UnsupportedEncodingException
-
openWriter
Open an writer for the file, using the encoding (if any) given in the doclet configuration. The file must have been created with a location ofDocumentationTool.Location.DOCUMENTATION_OUTPUT
and a corresponding relative path.- Specified by:
openWriter
in classDocFile
- Throws:
IOException
UnsupportedEncodingException
-
canRead
public boolean canRead()Return true if the file can be read. -
canWrite
public boolean canWrite()Return true if the file can be written. -
exists
public boolean exists()Return true if the file exists. -
getName
Return the base name (last component) of the file name. -
getPath
Return the file system path for this file. -
isAbsolute
public boolean isAbsolute()Return true is file has an absolute path name.- Specified by:
isAbsolute
in classDocFile
-
isDirectory
public boolean isDirectory()Return true is file identifies a directory.- Specified by:
isDirectory
in classDocFile
-
isFile
public boolean isFile()Return true is file identifies a file. -
isSameFile
Return true if this file is the same as another.- Specified by:
isSameFile
in classDocFile
-
list
If the file is a directory, list its contents.- Specified by:
list
in classDocFile
- Throws:
IOException
-
mkdirs
public boolean mkdirs()Create the file as a directory, including any parent directories. -
resolve
Derive a new file by resolving a relative path against this file. The new file will inherit the configuration and location of this file If this file has a path set, the new file will have a corresponding new path. -
resolve
Derive a new file by resolving a relative path against this file. The new file will inherit the configuration and location of this file If this file has a path set, the new file will have a corresponding new path. -
resolveAgainst
Resolve a relative file against the given output location.- Specified by:
resolveAgainst
in classDocFile
- Parameters:
locn
- Currently, onlyDocumentationTool.Location.DOCUMENTATION_OUTPUT
is supported.
-
toString
Return a string to identify the contents of this object, for debugging purposes. -
getJavaFileObjectForInput
-
getFileObjectForOutput
- Throws:
IOException
-