|
||||||||||
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.ftpbrowse.FTPRemoteFileSystemView
public class FTPRemoteFileSystemView
This class is used for browsing a remote file system. This class uses an
instance of the FTPClient
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 | |
---|---|
FTPRemoteFileSystemView(java.lang.String host,
int port,
java.net.PasswordAuthentication passwordAuthentication)
Creates an instance of the FTPRemoteFileSystemView . |
|
FTPRemoteFileSystemView(java.lang.String host,
java.net.PasswordAuthentication passwordAuthentication)
Creates an instance of the FTPRemoteFileSystemView . |
|
FTPRemoteFileSystemView(java.net.URL url,
java.net.PasswordAuthentication passwordAuthentication)
Creates a new instance of the FTP Remote File System View. |
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.io.File |
getParentDirectory(java.io.File dir)
|
java.net.PasswordAuthentication |
getPasswordAuthentication()
|
java.io.File[] |
getRoots()
|
java.lang.String |
getSystemDisplayName(java.io.File f)
|
java.lang.String |
getSystemTypeDescription(java.io.File f)
Always returns null. |
java.net.URL |
getUrl()
|
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 FTPRemoteFileSystemView(java.net.URL url, java.net.PasswordAuthentication passwordAuthentication)
url
- passwordAuthentication
- public FTPRemoteFileSystemView(java.lang.String host, int port, java.net.PasswordAuthentication passwordAuthentication) throws FTPBrowseException
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.passwordAuthentication
- The credentials to connect with. This can
be null.
FTPBrowseException
- If a URL
cannot be formed with
the values.URL
public FTPRemoteFileSystemView(java.lang.String host, java.net.PasswordAuthentication passwordAuthentication) throws FTPBrowseException
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.passwordAuthentication
- The credentials to use to connect. Can be
null.
FTPBrowseException
- If a URL
cannot be formed with
the values.URL
Method Detail |
---|
public java.net.PasswordAuthentication getPasswordAuthentication()
public java.net.URL getUrl()
public void disconnect()
public java.io.File createNewFolder(java.io.File containingDir) throws java.io.IOException
createNewFolder
in class javax.swing.filechooser.FileSystemView
java.io.IOException
FileSystemView.createNewFolder(java.io.File)
public java.io.File getDefaultDirectory()
getDefaultDirectory
in class javax.swing.filechooser.FileSystemView
FileSystemView.getDefaultDirectory()
public java.io.File getHomeDirectory()
getHomeDirectory
in class javax.swing.filechooser.FileSystemView
FileSystemView.getHomeDirectory()
public java.io.File[] getRoots()
getRoots
in class javax.swing.filechooser.FileSystemView
FileSystemView.getRoots()
public java.io.File createFileObject(java.io.File dir, java.lang.String filename)
createFileObject
in class javax.swing.filechooser.FileSystemView
FileSystemView.createFileObject(java.io.File,
java.lang.String)
public java.io.File createFileObject(java.lang.String path)
createFileObject
in class javax.swing.filechooser.FileSystemView
FileSystemView.createFileObject(java.lang.String)
public java.io.File getChild(java.io.File parent, java.lang.String fileName)
getChild
in class javax.swing.filechooser.FileSystemView
FileSystemView.getChild(java.io.File,
java.lang.String)
public java.io.File[] getFiles(java.io.File dir, boolean useFileHiding)
getFiles
in class javax.swing.filechooser.FileSystemView
FileSystemView.getFiles(java.io.File,
boolean)
public java.io.File getParentDirectory(java.io.File dir)
getParentDirectory
in class javax.swing.filechooser.FileSystemView
FileSystemView.getParentDirectory(java.io.File)
public java.lang.String getSystemDisplayName(java.io.File f)
getSystemDisplayName
in class javax.swing.filechooser.FileSystemView
FileSystemView.getSystemDisplayName(java.io.File)
public java.lang.String getSystemTypeDescription(java.io.File f)
getSystemTypeDescription
in class javax.swing.filechooser.FileSystemView
FileSystemView.getSystemTypeDescription(java.io.File)
public boolean isComputerNode(java.io.File dir)
isComputerNode
in class javax.swing.filechooser.FileSystemView
FileSystemView.isComputerNode(java.io.File)
public boolean isDrive(java.io.File dir)
isDrive
in class javax.swing.filechooser.FileSystemView
FileSystemView.isDrive(java.io.File)
public boolean isFileSystem(java.io.File f)
isFileSystem
in class javax.swing.filechooser.FileSystemView
true
if it is an absolute file or
false
FileSystemView.isFileSystem(java.io.File)
public boolean isFileSystemRoot(java.io.File dir)
isFileSystemRoot
in class javax.swing.filechooser.FileSystemView
FileSystemView.isFileSystemRoot(java.io.File)
public boolean isFloppyDrive(java.io.File dir)
isFloppyDrive
in class javax.swing.filechooser.FileSystemView
FileSystemView.isFloppyDrive(java.io.File)
public boolean isHiddenFile(java.io.File f)
isHiddenFile
in class javax.swing.filechooser.FileSystemView
FileSystemView.isHiddenFile(java.io.File)
public boolean isParent(java.io.File folder, java.io.File file)
isParent
in class javax.swing.filechooser.FileSystemView
FileSystemView.isParent(java.io.File,
java.io.File)
public boolean isRoot(java.io.File f)
isRoot
in class javax.swing.filechooser.FileSystemView
FileSystemView.isRoot(java.io.File)
public java.lang.Boolean isTraversable(java.io.File f)
isTraversable
in class javax.swing.filechooser.FileSystemView
FileSystemView.isTraversable(java.io.File)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |