public class KettleVFS extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.vfs.FileObject |
createTempFile(String prefix,
String suffix,
String directory) |
static org.apache.commons.vfs.FileObject |
createTempFile(String prefix,
String suffix,
String directory,
VariableSpace space) |
static boolean |
fileExists(String vfsFilename) |
static boolean |
fileExists(String vfsFilename,
VariableSpace space) |
static Comparator<org.apache.commons.vfs.FileObject> |
getComparator() |
static FileInputStream |
getFileInputStream(org.apache.commons.vfs.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.vfs.FileObject fileObject) |
static org.apache.commons.vfs.FileObject |
getFileObject(String vfsFilename) |
static org.apache.commons.vfs.FileObject |
getFileObject(String vfsFilename,
org.apache.commons.vfs.FileSystemOptions fsOptions) |
static org.apache.commons.vfs.FileObject |
getFileObject(String vfsFilename,
VariableSpace space) |
static org.apache.commons.vfs.FileObject |
getFileObject(String vfsFilename,
VariableSpace space,
org.apache.commons.vfs.FileSystemOptions fsOptions) |
org.apache.commons.vfs.FileSystemManager |
getFileSystemManager() |
static InputStream |
getInputStream(org.apache.commons.vfs.FileObject fileObject) |
static InputStream |
getInputStream(String vfsFilename) |
static InputStream |
getInputStream(String vfsFilename,
VariableSpace space) |
static KettleVFS |
getInstance() |
static OutputStream |
getOutputStream(org.apache.commons.vfs.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.vfs.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) |
public org.apache.commons.vfs.FileSystemManager getFileSystemManager()
public static KettleVFS getInstance()
public static org.apache.commons.vfs.FileObject getFileObject(String vfsFilename) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs.FileObject getFileObject(String vfsFilename, VariableSpace space) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs.FileObject getFileObject(String vfsFilename, org.apache.commons.vfs.FileSystemOptions fsOptions) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs.FileObject getFileObject(String vfsFilename, VariableSpace space, org.apache.commons.vfs.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.vfs.FileObject fileObject) throws org.apache.commons.vfs.FileSystemException
org.apache.commons.vfs.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.vfs.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.vfs.FileSystemOptions fsOptions, boolean append) throws KettleFileException
KettleFileException
public static String getFilename(org.apache.commons.vfs.FileObject fileObject)
public static org.apache.commons.vfs.FileObject createTempFile(String prefix, String suffix, String directory) throws KettleFileException
KettleFileException
public static org.apache.commons.vfs.FileObject createTempFile(String prefix, String suffix, String directory, VariableSpace space) throws KettleFileException
KettleFileException
public static Comparator<org.apache.commons.vfs.FileObject> getComparator()
@Deprecated public static FileInputStream getFileInputStream(org.apache.commons.vfs.FileObject fileObject) throws IOException
fileObject
- IOException