public class StgFileSource extends FileSource
FileSource plus extension check for "stg" extension.AbstractFileInfo.OptionsFILES_ONLYasStringOpt, errors, file, url| Constructor and Description |
|---|
StgFileSource(File file)
Creates a new file source from an existing File object.
|
StgFileSource(File file,
boolean doValidate)
Creates a new file source from an existing File object with optional validation.
|
StgFileSource(String fileName)
Creates a new file source from a file name.
|
StgFileSource(String fileName,
InfoLocationOptions option)
Creates a new file source from a file name with options.
|
StgFileSource(String directory,
String fileName)
Creates a new file source from a path and a file name.
|
StgFileSource(String directory,
String fileName,
InfoLocationOptions option)
Creates a new file source from a path and a file name with options.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
init(File file,
String directory,
String fileName,
InfoLocationOptions option)
Initialize the file source with any parameters presented by the constructors.
|
asString, getInitError, getSource, valOptionasFile, asURL, getAbsoluteName, getAbsolutePath, getBaseFileName, getFileExtension, getFullFileName, getRootPath, getSetRootName, getSetRootPath, isValid, reset, setAsStringOption, testFile, toString, tryFS, tryResourceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisValidpublic StgFileSource(File file, boolean doValidate)
file - existing file objectdoValidate - true if internal validation is required, false otherwise (for instance if the file object comes from another loader).
If validation is set to false and the input argument for file is not valid, the behavior of this object and anyone using it is unpredictable.
If validation is set to false a null validation and a validation of the getURI method of the file is still run by the constructor.public StgFileSource(File file)
file - existing file objectpublic StgFileSource(String fileName)
fileName - name of the file.
The file name must include a path that is accessible.
The file name must include path information if it is not in the root path.
Path information can be relative to any path in the class path.public StgFileSource(String fileName, InfoLocationOptions option)
fileName - name of the file.
The file name must include a path that is accessible.
The file name must include path information if it is not in the root path.
Path information can be relative to any path in the class path.option - an option on how to locate the filepublic StgFileSource(String directory, String fileName)
directory - a directory in which the file can be found. The directory can be absolute or relative to any directory in the class path.fileName - the file name to locatepublic StgFileSource(String directory, String fileName, InfoLocationOptions option)
directory - directory a directory in which the file can be found. The directory can be absolute or relative to any directory in the class path.fileName - the file name to locateoption - an option on how to locate the fileprotected void init(File file, String directory, String fileName, InfoLocationOptions option)
init in class AbstractFileInfofile - a file with all informationdirectory - a directory to locate a file infileName - a file name with or without path informationoption - an option on how to locate the file (not used if parameter file is set)Copyright © 2010–2017. All rights reserved.