Package org.pentaho.di.core.vfs
Class KettleVFSImpl
java.lang.Object
org.pentaho.di.core.vfs.KettleVFSImpl
- All Implemented Interfaces:
IKettleVFS
Implementation of IKettleVFS. Implementation of VFS file access for kettle. Use KettleVFS.getInstance( Bowl ) to get
an instance.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.vfs2.FileObjectcreateTempFile(String prefix, String suffix, String directory) org.apache.commons.vfs2.FileObjectcreateTempFile(String prefix, String suffix, String directory, VariableSpace space) org.apache.commons.vfs2.FileObjectcreateTempFile(String prefix, KettleVFS.Suffix suffix) Creates a file using "java.io.tmpdir" directoryorg.apache.commons.vfs2.FileObjectcreateTempFile(String prefix, KettleVFS.Suffix suffix, String directory) org.apache.commons.vfs2.FileObjectcreateTempFile(String prefix, KettleVFS.Suffix suffix, String directory, VariableSpace space) org.apache.commons.vfs2.FileObjectcreateTempFile(String prefix, KettleVFS.Suffix suffix, VariableSpace variableSpace) Creates a file using "java.io.tmpdir" directorybooleanfileExists(String vfsFilename) booleanfileExists(String vfsFilename, VariableSpace space) org.apache.commons.vfs2.FileObjectgetFileObject(String vfsFilename) org.apache.commons.vfs2.FileObjectgetFileObject(String vfsFilename, org.apache.commons.vfs2.FileSystemOptions fsOptions) org.apache.commons.vfs2.FileObjectgetFileObject(String vfsFilename, VariableSpace space) org.apache.commons.vfs2.FileObjectgetFileObject(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions) org.apache.commons.vfs2.FileSystemOptionsgetFileSystemOptions(String scheme, String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions) getFriendlyURI(String filename) getFriendlyURI(String filename, VariableSpace space) getInputStream(String vfsFilename) getInputStream(String vfsFilename, VariableSpace space) getOutputStream(String vfsFilename, boolean append) getOutputStream(String vfsFilename, VariableSpace space, boolean append) getOutputStream(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions, boolean append) getOutputStream(org.apache.commons.vfs2.FileObject fileObject, boolean append) getTextFileContent(String vfsFilename, String charSetName) Read a text file (like an XML document).getTextFileContent(String vfsFilename, VariableSpace space, String charSetName) voidreset()resets the VariableSpaceorg.apache.commons.vfs2.FileNameresolveURI(String vfsFilename) Resolves the given URI to a file name.
-
Field Details
-
CONNECTION
- See Also:
-
-
Method Details
-
getFileObject
public org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename) throws KettleFileException - Specified by:
getFileObjectin interfaceIKettleVFS- Throws:
KettleFileException
-
getFileObject
public org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space) throws KettleFileException - Specified by:
getFileObjectin interfaceIKettleVFS- Throws:
KettleFileException
-
getFileObject
public org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException - Specified by:
getFileObjectin interfaceIKettleVFS- Throws:
KettleFileException
-
getFileObject
public org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException - Specified by:
getFileObjectin interfaceIKettleVFS- Throws:
KettleFileException
-
resolveURI
Description copied from interface:IKettleVFSResolves the given URI to a file name.- Specified by:
resolveURIin interfaceIKettleVFS- Parameters:
vfsFilename- The URI to resolve.- Returns:
- A
FileNamethat matches the URI; nevernull. - Throws:
KettleFileException- if this is not possible.
-
getFileSystemOptions
public org.apache.commons.vfs2.FileSystemOptions getFileSystemOptions(String scheme, String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions) throws IOException - Specified by:
getFileSystemOptionsin interfaceIKettleVFS- Throws:
IOException
-
getFriendlyURI
- Specified by:
getFriendlyURIin interfaceIKettleVFS
-
getFriendlyURI
- Specified by:
getFriendlyURIin interfaceIKettleVFS
-
getTextFileContent
Description copied from interface:IKettleVFSRead a text file (like an XML document). WARNING DO NOT USE FOR DATA FILES.- Specified by:
getTextFileContentin interfaceIKettleVFS- Parameters:
vfsFilename- the filename or URL to read fromcharSetName- the character set of the string (UTF-8, ISO8859-1, etc)- Returns:
- The content of the file as a String
- Throws:
KettleFileException
-
getTextFileContent
public String getTextFileContent(String vfsFilename, VariableSpace space, String charSetName) throws KettleFileException - Specified by:
getTextFileContentin interfaceIKettleVFS- Throws:
KettleFileException
-
fileExists
- Specified by:
fileExistsin interfaceIKettleVFS- Throws:
KettleFileException
-
fileExists
- Specified by:
fileExistsin interfaceIKettleVFS- Throws:
KettleFileException
-
getInputStream
- Specified by:
getInputStreamin interfaceIKettleVFS- Throws:
KettleFileException
-
getInputStream
public InputStream getInputStream(String vfsFilename, VariableSpace space) throws KettleFileException - Specified by:
getInputStreamin interfaceIKettleVFS- Throws:
KettleFileException
-
getOutputStream
public OutputStream getOutputStream(org.apache.commons.vfs2.FileObject fileObject, boolean append) throws IOException - Specified by:
getOutputStreamin interfaceIKettleVFS- Throws:
IOException
-
getOutputStream
- Specified by:
getOutputStreamin interfaceIKettleVFS- Throws:
KettleFileException
-
getOutputStream
public OutputStream getOutputStream(String vfsFilename, VariableSpace space, boolean append) throws KettleFileException - Specified by:
getOutputStreamin interfaceIKettleVFS- Throws:
KettleFileException
-
getOutputStream
public OutputStream getOutputStream(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions, boolean append) throws KettleFileException - Specified by:
getOutputStreamin interfaceIKettleVFS- Throws:
KettleFileException
-
createTempFile
public org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix) throws KettleFileException Description copied from interface:IKettleVFSCreates a file using "java.io.tmpdir" directory- Specified by:
createTempFilein interfaceIKettleVFS- Parameters:
prefix- - file name- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
public org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, VariableSpace variableSpace) throws KettleFileException Description copied from interface:IKettleVFSCreates a file using "java.io.tmpdir" directory- Specified by:
createTempFilein interfaceIKettleVFS- Parameters:
prefix- - file namesuffix- - file extensionvariableSpace- is used to get system variables- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
public org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, String directory) throws KettleFileException - Specified by:
createTempFilein interfaceIKettleVFS- Parameters:
prefix- - file namesuffix- - file extensiondirectory- - directory where file will be created- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
public org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory) throws KettleFileException - Specified by:
createTempFilein interfaceIKettleVFS- Throws:
KettleFileException
-
createTempFile
public org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, String directory, VariableSpace space) throws KettleFileException - Specified by:
createTempFilein interfaceIKettleVFS- Parameters:
prefix- - file namedirectory- path to directory where file will be createdspace- is used to get system variables- Returns:
- FileObject
- Throws:
KettleFileException
-
createTempFile
public org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory, VariableSpace space) throws KettleFileException - Specified by:
createTempFilein interfaceIKettleVFS- Throws:
KettleFileException
-
reset
public void reset()Description copied from interface:IKettleVFSresets the VariableSpace- Specified by:
resetin interfaceIKettleVFS
-