| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileSystemView
com.mindtree.techworks.insight.download.sftpbrowse.SFTPRemoteFileSystemView
public class SFTPRemoteFileSystemView
This class is used for browsing a remote file system. This class uses an
 instance of the SftpClient to
 connect to the underlying FTP Source. Connection timeouts may occur.
FileSystemView| Field Summary | |
|---|---|
static java.net.PasswordAuthentication | 
anonPassAuth
Password Authentication to use for anonymous access  | 
static java.lang.String | 
FILE_SEPERATOR
Seperator character between files  | 
protected static java.lang.String | 
FILE_SYSTEM_ROOT_NAME
The root file system path  | 
protected static java.util.logging.Logger | 
logger
The logger instance for this class  | 
| Constructor Summary | |
|---|---|
SFTPRemoteFileSystemView(java.lang.String host,
                         int port,
                         java.lang.String startDirectory,
                         java.net.PasswordAuthentication passwordAuthentication,
                         java.awt.Component parentComponent)
Creates an instance of the FTPRemoteFileSystemView. | 
|
SFTPRemoteFileSystemView(java.lang.String host,
                         java.lang.String startDirectory,
                         java.net.PasswordAuthentication passwordAuthentication,
                         java.awt.Component parentComponent)
Creates an instance of the FTPRemoteFileSystemView. | 
|
| Method Summary | |
|---|---|
 java.io.File | 
createFileObject(java.io.File dir,
                 java.lang.String filename)
 | 
 java.io.File | 
createFileObject(java.lang.String path)
 | 
 java.io.File | 
createNewFolder(java.io.File containingDir)
 | 
 void | 
disconnect()
If a connection to the server is still open, disconnects it.  | 
 java.io.File | 
getChild(java.io.File parent,
         java.lang.String fileName)
 | 
 java.io.File | 
getDefaultDirectory()
In the remote view home and default directory are considered to be the same.  | 
 java.io.File[] | 
getFiles(java.io.File dir,
         boolean useFileHiding)
 | 
 java.io.File | 
getHomeDirectory()
 | 
 java.lang.String | 
getHost()
 | 
 java.io.File | 
getParentDirectory(java.io.File dir)
 | 
 java.net.PasswordAuthentication | 
getPasswordAuthentication()
 | 
 int | 
getPort()
 | 
 java.io.File[] | 
getRoots()
 | 
 java.lang.String | 
getSystemDisplayName(java.io.File f)
 | 
 java.lang.String | 
getSystemTypeDescription(java.io.File f)
Always returns null.  | 
 boolean | 
isComputerNode(java.io.File dir)
 | 
 boolean | 
isDrive(java.io.File dir)
Returns false, drives not supported on remote systems  | 
 boolean | 
isFileSystem(java.io.File f)
Determines if the file is a real file or a link to another file.  | 
 boolean | 
isFileSystemRoot(java.io.File dir)
 | 
 boolean | 
isFloppyDrive(java.io.File dir)
Returns false.  | 
 boolean | 
isHiddenFile(java.io.File f)
Hidden files are not supported now.  | 
 boolean | 
isParent(java.io.File folder,
         java.io.File file)
 | 
 boolean | 
isRoot(java.io.File f)
 | 
 java.lang.Boolean | 
isTraversable(java.io.File f)
 | 
| Methods inherited from class javax.swing.filechooser.FileSystemView | 
|---|
createFileSystemRoot, getFileSystemView, getSystemIcon | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static final java.util.logging.Logger logger
public static final java.net.PasswordAuthentication anonPassAuth
protected static final java.lang.String FILE_SYSTEM_ROOT_NAME
public static final java.lang.String FILE_SEPERATOR
| Constructor Detail | 
|---|
public SFTPRemoteFileSystemView(java.lang.String host,
                                int port,
                                java.lang.String startDirectory,
                                java.net.PasswordAuthentication passwordAuthentication,
                                java.awt.Component parentComponent)
                         throws SFTPBrowseException
FTPRemoteFileSystemView. The
 host name supplied should be the same as one would pass to construct an
 URL object.
host - The address of the host. This can be a host name or IP
            address.port - The port to connect to.startDirectory - The directory to start browsing inpasswordAuthentication - The credentials to connect with. This can
            be null.parentComponent - Parent component used for messages
SFTPBrowseException - If the host is null.
public SFTPRemoteFileSystemView(java.lang.String host,
                                java.lang.String startDirectory,
                                java.net.PasswordAuthentication passwordAuthentication,
                                java.awt.Component parentComponent)
                         throws SFTPBrowseException
FTPRemoteFileSystemView. The
 host name supplied should be the same as one would pass to construct an
 URL object.
host - The address of the host. This can be a host name or IP
            address.startDirectory - The directory to start browsing inpasswordAuthentication - The credentials to use to connect. Can be
            null.parentComponent - Parent component used for messages
SFTPBrowseException - if the host is null| Method Detail | 
|---|
public java.net.PasswordAuthentication getPasswordAuthentication()
public java.lang.String getHost()
public int getPort()
public void disconnect()
public java.io.File createNewFolder(java.io.File containingDir)
                             throws java.io.IOException
createNewFolder in class javax.swing.filechooser.FileSystemViewjava.io.IOExceptionFileSystemView.createNewFolder(java.io.File)public java.io.File getDefaultDirectory()
getDefaultDirectory in class javax.swing.filechooser.FileSystemViewFileSystemView.getDefaultDirectory()public java.io.File getHomeDirectory()
getHomeDirectory in class javax.swing.filechooser.FileSystemViewFileSystemView.getHomeDirectory()public java.io.File[] getRoots()
getRoots in class javax.swing.filechooser.FileSystemViewFileSystemView.getRoots()
public java.io.File createFileObject(java.io.File dir,
                                     java.lang.String filename)
createFileObject in class javax.swing.filechooser.FileSystemViewFileSystemView.createFileObject(java.io.File,
      java.lang.String)public java.io.File createFileObject(java.lang.String path)
createFileObject in class javax.swing.filechooser.FileSystemViewFileSystemView.createFileObject(java.lang.String)
public java.io.File getChild(java.io.File parent,
                             java.lang.String fileName)
getChild in class javax.swing.filechooser.FileSystemViewFileSystemView.getChild(java.io.File,
      java.lang.String)
public java.io.File[] getFiles(java.io.File dir,
                               boolean useFileHiding)
getFiles in class javax.swing.filechooser.FileSystemViewFileSystemView.getFiles(java.io.File,
      boolean)public java.io.File getParentDirectory(java.io.File dir)
getParentDirectory in class javax.swing.filechooser.FileSystemViewFileSystemView.getParentDirectory(java.io.File)public java.lang.String getSystemDisplayName(java.io.File f)
getSystemDisplayName in class javax.swing.filechooser.FileSystemViewFileSystemView.getSystemDisplayName(java.io.File)public java.lang.String getSystemTypeDescription(java.io.File f)
getSystemTypeDescription in class javax.swing.filechooser.FileSystemViewFileSystemView.getSystemTypeDescription(java.io.File)public boolean isComputerNode(java.io.File dir)
isComputerNode in class javax.swing.filechooser.FileSystemViewFileSystemView.isComputerNode(java.io.File)public boolean isDrive(java.io.File dir)
isDrive in class javax.swing.filechooser.FileSystemViewFileSystemView.isDrive(java.io.File)public boolean isFileSystem(java.io.File f)
isFileSystem in class javax.swing.filechooser.FileSystemViewtrue if it is an absolute file or
         falseFileSystemView.isFileSystem(java.io.File)public boolean isFileSystemRoot(java.io.File dir)
isFileSystemRoot in class javax.swing.filechooser.FileSystemViewFileSystemView.isFileSystemRoot(java.io.File)public boolean isFloppyDrive(java.io.File dir)
isFloppyDrive in class javax.swing.filechooser.FileSystemViewFileSystemView.isFloppyDrive(java.io.File)public boolean isHiddenFile(java.io.File f)
isHiddenFile in class javax.swing.filechooser.FileSystemViewFileSystemView.isHiddenFile(java.io.File)
public boolean isParent(java.io.File folder,
                        java.io.File file)
isParent in class javax.swing.filechooser.FileSystemViewFileSystemView.isParent(java.io.File,
      java.io.File)public boolean isRoot(java.io.File f)
isRoot in class javax.swing.filechooser.FileSystemViewFileSystemView.isRoot(java.io.File)public java.lang.Boolean isTraversable(java.io.File f)
isTraversable in class javax.swing.filechooser.FileSystemViewFileSystemView.isTraversable(java.io.File)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||