net.sf.jabb.util.vfs
Class VfsUtility

java.lang.Object
  extended by net.sf.jabb.util.vfs.VfsUtility

public class VfsUtility
extends Object

Wrapper on top of commons-vfs.

Author:
James Hu

Constructor Summary
VfsUtility()
           
 
Method Summary
static void close(org.apache.commons.vfs2.FileObject fo)
          Close the FileObject.
static void close(org.apache.commons.vfs2.FileSystemManager fsManager)
          Close the FileSystemManager.
static void close(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject... fos)
          Close both FileObject(s) and FileSystemManager.
static void close(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo)
          Close both FileObject and FileSystemManager.
static void configHttpFileSystemProxy(org.apache.commons.vfs2.FileSystemOptions fsOptions, String webProxyHost, Integer webProxyPort, String webProxyUserName, String webProxyPassword)
          Configure FileSystemOptions for HttpFileSystem
static org.apache.commons.vfs2.FileSystemManager getManager()
          Get a new instance of FileSystemManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VfsUtility

public VfsUtility()
Method Detail

getManager

public static org.apache.commons.vfs2.FileSystemManager getManager()
Get a new instance of FileSystemManager.

Returns:
an instance of FileSystemManager

close

public static void close(org.apache.commons.vfs2.FileSystemManager fsManager)
Close the FileSystemManager.

Parameters:
fsManager - the file system to be closed. It can be null.

close

public static void close(org.apache.commons.vfs2.FileObject fo)
Close the FileObject.

Parameters:
fo - the FileObject to be closed. It can be null.

close

public static void close(org.apache.commons.vfs2.FileSystemManager fsManager,
                         org.apache.commons.vfs2.FileObject fo)
Close both FileObject and FileSystemManager.

Parameters:
fsManager - The FileSystemManager to be closed. It can be null.
fo - The FileObject to be closed. It can be null.

close

public static void close(org.apache.commons.vfs2.FileSystemManager fsManager,
                         org.apache.commons.vfs2.FileObject... fos)
Close both FileObject(s) and FileSystemManager.

Parameters:
fsManager - The FileSystemManager to be closed. It can be null.
fo - The FileObjects to be closed. It can contain null.

configHttpFileSystemProxy

public static void configHttpFileSystemProxy(org.apache.commons.vfs2.FileSystemOptions fsOptions,
                                             String webProxyHost,
                                             Integer webProxyPort,
                                             String webProxyUserName,
                                             String webProxyPassword)
Configure FileSystemOptions for HttpFileSystem

Parameters:
fsOptions -
webProxyHost -
webProxyPort -
webProxyUserName -
webProxyPassword -


Copyright © 2012. All Rights Reserved.