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
- Since:
- 1.8
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateStandardDocFile(Path file) Create a StandardDocFile for a given file.privateStandardDocFile(JavaFileManager.Location location, DocPath path) Create a StandardDocFile for a given location and relative path. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRead()Return true if the file can be read.booleancanWrite()Return true if the file can be written.booleanexists()Return true if the file exists.private FileObjectprivate JavaFileObjectgetName()Return the base name (last component) of the file name.getPath()Return the file system path for this file.booleanReturn true is file has an absolute path name.booleanReturn true is file identifies a directory.booleanisFile()Return true is file identifies a file.booleanisSameFile(DocFile other) Return true if this file is the same as another.list()If the file is a directory, list its contents.booleanmkdirs()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 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:
openInputStreamin classDocFile- Throws:
IOException
-
openOutputStream
Open an output stream for the file. The file must have been created with a location ofDocumentationTool.Location.DOCUMENTATION_OUTPUTand a corresponding relative path.- Specified by:
openOutputStreamin classDocFile- Throws:
IOExceptionUnsupportedEncodingException
-
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_OUTPUTand a corresponding relative path.- Specified by:
openWriterin classDocFile- Throws:
IOExceptionUnsupportedEncodingException
-
canRead
-
canWrite
-
exists
-
getName
-
getPath
-
isAbsolute
public boolean isAbsolute()Return true is file has an absolute path name.- Specified by:
isAbsolutein classDocFile
-
isDirectory
public boolean isDirectory()Return true is file identifies a directory.- Specified by:
isDirectoryin classDocFile
-
isFile
-
isSameFile
Return true if this file is the same as another.- Specified by:
isSameFilein classDocFile
-
list
If the file is a directory, list its contents.- Specified by:
listin classDocFile- Throws:
IOException
-
mkdirs
-
resolve
-
resolve
-
resolveAgainst
Resolve a relative file against the given output location.- Specified by:
resolveAgainstin classDocFile- Parameters:
locn- Currently, onlyis supported.invalid reference
DocumentationTool.Location.DOCUMENTATION_OUTPUT
-
toString
-
getJavaFileObjectForInput
-
getFileObjectForOutput
- Throws:
IOException
-