public class KettleVFS extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KettleVFS.Suffix |
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) |
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 org.apache.commons.vfs2.FileSystemManager getFileSystemManager()
public static KettleVFS getInstance()
public static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions) throws KettleFileException
KettleFileException
public 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)IOException
KettleFileException
public static String getTextFileContent(String vfsFilename, VariableSpace space, String charSetName) throws KettleFileException
KettleFileException
public static boolean fileExists(String vfsFilename) throws KettleFileException
KettleFileException
public static boolean fileExists(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileException
public static InputStream getInputStream(org.apache.commons.vfs2.FileObject fileObject) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemException
public static InputStream getInputStream(String vfsFilename) throws KettleFileException
KettleFileException
public static InputStream getInputStream(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileException
public static OutputStream getOutputStream(org.apache.commons.vfs2.FileObject fileObject, boolean append) throws IOException
IOException
public static OutputStream getOutputStream(String vfsFilename, boolean append) throws KettleFileException
KettleFileException
public static OutputStream getOutputStream(String vfsFilename, VariableSpace space, boolean append) throws KettleFileException
KettleFileException
public static OutputStream getOutputStream(String vfsFilename, VariableSpace space, org.apache.commons.vfs2.FileSystemOptions fsOptions, boolean append) throws KettleFileException
KettleFileException
public 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 extensionKettleFileException
public 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 variablesKettleFileException
public 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 createdKettleFileException
public static org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory) throws KettleFileException
KettleFileException
public 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 variablesKettleFileException
public static org.apache.commons.vfs2.FileObject createTempFile(String prefix, String suffix, String directory, VariableSpace space) throws KettleFileException
KettleFileException
public static Comparator<org.apache.commons.vfs2.FileObject> getComparator()
@Deprecated public static FileInputStream getFileInputStream(org.apache.commons.vfs2.FileObject fileObject) throws IOException
fileObject
- IOException
public static boolean startsWithScheme(String vfsFileName)
vfsFileName
- public static void closeEmbeddedFileSystem(String embeddedMetastoreKey)
public void reset()
public static void freeUnusedResources()
DefaultFileSystemManager.freeUnusedResources()
Copyright © 2018 Hitachi Vantara. All rights reserved.