public class KettleVFS extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KettleVFS.Suffix |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION |
static String |
TEMP_DIR |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeEmbeddedFileSystem(String embeddedMetastoreKey) |
static org.apache.commons.vfs2.FileObject |
createTempFile(String prefix,
KettleVFS.Suffix suffix)
Creates a file using "java.io.tmpdir" directory
|
static org.apache.commons.vfs2.FileObject |
createTempFile(String prefix,
KettleVFS.Suffix suffix,
String directory) |
static org.apache.commons.vfs2.FileObject |
createTempFile(String prefix,
KettleVFS.Suffix suffix,
String directory,
VariableSpace space) |
static org.apache.commons.vfs2.FileObject |
createTempFile(String prefix,
KettleVFS.Suffix suffix,
VariableSpace variableSpace)
Creates a file using "java.io.tmpdir" directory
|
static org.apache.commons.vfs2.FileObject |
createTempFile(String prefix,
String suffix,
String directory) |
static org.apache.commons.vfs2.FileObject |
createTempFile(String prefix,
String suffix,
String directory,
VariableSpace space) |
static boolean |
fileExists(String vfsFilename) |
static boolean |
fileExists(String vfsFilename,
VariableSpace space) |
static void |
freeUnusedResources() |
static Comparator<org.apache.commons.vfs2.FileObject> |
getComparator() |
static FileInputStream |
getFileInputStream(org.apache.commons.vfs2.FileObject fileObject)
Deprecated.
because of API change in Apache VFS. As a workaround use FileObject.getName().getPathDecoded(); Then
use a regular File() object to create a File Input stream.
|
static String |
getFilename(org.apache.commons.vfs2.FileObject fileObject) |
static org.apache.commons.vfs2.FileObject |
getFileObject(String vfsFilename) |
static org.apache.commons.vfs2.FileObject |
getFileObject(String vfsFilename,
org.apache.commons.vfs2.FileSystemOptions fsOptions) |
static org.apache.commons.vfs2.FileObject |
getFileObject(String vfsFilename,
VariableSpace space) |
static org.apache.commons.vfs2.FileObject |
getFileObject(String vfsFilename,
VariableSpace space,
org.apache.commons.vfs2.FileSystemOptions fsOptions) |
org.apache.commons.vfs2.FileSystemManager |
getFileSystemManager() |
static String |
getFriendlyURI(org.apache.commons.vfs2.FileObject fileObject) |
static String |
getFriendlyURI(String filename) |
static InputStream |
getInputStream(org.apache.commons.vfs2.FileObject fileObject) |
static InputStream |
getInputStream(String vfsFilename) |
static InputStream |
getInputStream(String vfsFilename,
VariableSpace space) |
static KettleVFS |
getInstance() |
static OutputStream |
getOutputStream(org.apache.commons.vfs2.FileObject fileObject,
boolean append) |
static OutputStream |
getOutputStream(String vfsFilename,
boolean append) |
static OutputStream |
getOutputStream(String vfsFilename,
VariableSpace space,
boolean append) |
static OutputStream |
getOutputStream(String vfsFilename,
VariableSpace space,
org.apache.commons.vfs2.FileSystemOptions fsOptions,
boolean append) |
static String |
getTextFileContent(String vfsFilename,
String charSetName)
Read a text file (like an XML document).
|
static String |
getTextFileContent(String vfsFilename,
VariableSpace space,
String charSetName) |
protected static boolean |
hasSchemePattern(String path,
String patternString) |
protected static String |
normalizePath(String path,
String scheme) |
void |
reset() |
static boolean |
startsWithScheme(String vfsFileName)
Check if filename starts with one of the known protocols like file: zip: ram: smb: jar: etc.
|
public static final String TEMP_DIR
public static final String CONNECTION
public org.apache.commons.vfs2.FileSystemManager getFileSystemManager()
public static KettleVFS getInstance()
public static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename) throws KettleFileException
KettleFileExceptionpublic static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileExceptionpublic static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException
KettleFileExceptionpublic static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException
KettleFileExceptionpublic static String getTextFileContent(String vfsFilename, String charSetName) throws KettleFileException
vfsFilename - the filename or URL to read fromcharSetName - the character set of the string (UTF-8, ISO8859-1, etc)IOExceptionKettleFileExceptionpublic static String getTextFileContent(String vfsFilename, VariableSpace space, String charSetName) throws KettleFileException
KettleFileExceptionpublic static boolean fileExists(String vfsFilename) throws KettleFileException
KettleFileExceptionpublic static boolean fileExists(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileExceptionpublic static InputStream getInputStream(org.apache.commons.vfs2.FileObject fileObject) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionpublic static InputStream getInputStream(String vfsFilename) throws KettleFileException
KettleFileExceptionpublic static InputStream getInputStream(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileExceptionpublic static OutputStream getOutputStream(org.apache.commons.vfs2.FileObject fileObject, boolean append) throws IOException
IOExceptionpublic static OutputStream getOutputStream(String vfsFilename, boolean append) throws KettleFileException
KettleFileExceptionpublic static OutputStream getOutputStream(String vfsFilename, VariableSpace space, boolean append) throws KettleFileException
KettleFileExceptionpublic static OutputStream getOutputStream(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions, boolean append) throws KettleFileException
KettleFileExceptionpublic static String getFilename(org.apache.commons.vfs2.FileObject fileObject)
public static String getFriendlyURI(org.apache.commons.vfs2.FileObject fileObject)
public static org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix) throws KettleFileException
prefix - - file nameprefix - - file extensionKettleFileExceptionpublic static org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, VariableSpace variableSpace) throws KettleFileException
prefix - - file namesuffix - - file extensionvariableSpace - is used to get system variablesKettleFileExceptionpublic static org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, String directory) throws KettleFileException
prefix - - file namesuffix - - file extensiondirectory - - directory where file will be createdKettleFileExceptionpublic static org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory) throws KettleFileException
KettleFileExceptionpublic static org.apache.commons.vfs2.FileObject createTempFile(String prefix, KettleVFS.Suffix suffix, String directory, VariableSpace space) throws KettleFileException
prefix - - file namedirectory - path to directory where file will be createdspace - is used to get system variablesKettleFileExceptionpublic static org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory, VariableSpace space) throws KettleFileException
KettleFileExceptionpublic static Comparator<org.apache.commons.vfs2.FileObject> getComparator()
@Deprecated public static FileInputStream getFileInputStream(org.apache.commons.vfs2.FileObject fileObject) throws IOException
fileObject - IOExceptionpublic static boolean startsWithScheme(String vfsFileName)
vfsFileName - public static void closeEmbeddedFileSystem(String embeddedMetastoreKey)
public void reset()
public static void freeUnusedResources()
DefaultFileSystemManager.freeUnusedResources()Copyright © 2020 Hitachi Vantara. All rights reserved.