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
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 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:
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
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:
isAbsolutein classDocFile
-
isDirectory
public boolean isDirectory()Return true is file identifies a directory.- Specified by:
isDirectoryin 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:
isSameFilein classDocFile
-
list
If the file is a directory, list its contents.- Specified by:
listin 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:
resolveAgainstin classDocFile- Parameters:
locn- Currently, onlyDocumentationTool.Location.DOCUMENTATION_OUTPUTis supported.
-
toString
Return a string to identify the contents of this object, for debugging purposes. -
getJavaFileObjectForInput
-
getFileObjectForOutput
- Throws:
IOException
-