|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
com.mindtree.techworks.insight.download.sftpbrowse.SFTPFileFile
public class SFTPFileFile
This class is a wrapper for SFTPFile
. This class is to be used
by JFileChooser
which requires an instance
of File
to it.
Most operations on the file wrapped by this class are not allowed .
SFTPFile
is meant to contain information about files on a
remote server, and SFTPFileFile
is also meant for the same. It
merely provides a File
like interface to SFTPFile
.
For any operations on the file, use the information about the file from an
instance of this class and use
SftpClient
or any wrapper around
it. You might use any other SFTPClient also.
The getHostURL
, getPort
and
getPasswordAuthentication
methods return the host and authentication information to connect to the
host.
SftpFile
,
File
,
Serialized FormField Summary |
---|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
SFTPFileFile(com.sshtools.j2ssh.sftp.SftpFile sftpFile,
javax.swing.filechooser.FileSystemView fileSystemView)
Constructs a new FTPFileFile object. |
Method Summary | |
---|---|
boolean |
canRead()
Always returns true. |
boolean |
canWrite()
Always returns false. |
int |
compareTo(java.io.File pathname)
|
int |
compareTo(java.lang.Object o)
|
boolean |
createNewFile()
Operation not supported. |
boolean |
delete()
Operation not supported, always returns false |
void |
deleteOnExit()
Operation not supported. |
boolean |
equals(java.lang.Object obj)
|
boolean |
exists()
Returns true always. |
java.io.File |
getAbsoluteFile()
Returns the same instance! |
java.lang.String |
getAbsolutePath()
Returns the path! |
java.io.File |
getCanonicalFile()
Returns the instance as the canonical file |
java.lang.String |
getCanonicalPath()
Always returns the unix style path from the root. |
java.lang.String |
getHost()
|
java.lang.String |
getName()
Returns the name of the file |
java.lang.String |
getParent()
Returns the path of the parent, if a file system view is present, or null . |
java.io.File |
getParentFile()
Returns the parent directory, if a file system view is present, or null . |
java.net.PasswordAuthentication |
getPasswordAuthentication()
|
java.lang.String |
getPath()
Returns the path in the unix style. |
int |
getPort()
|
com.sshtools.j2ssh.sftp.SftpFile |
getSftpFile()
|
boolean |
isAbsolute()
|
boolean |
isDirectory()
|
boolean |
isFile()
|
boolean |
isHidden()
Returns false. |
long |
lastModified()
|
long |
length()
Returns the size of the FTP file instance |
java.lang.String[] |
list()
Operation is not supported. |
java.lang.String[] |
list(java.io.FilenameFilter filter)
Operation is not supported. |
java.io.File[] |
listFiles()
Operation is not supported. |
java.io.File[] |
listFiles(java.io.FileFilter filter)
Operation is not supported. |
java.io.File[] |
listFiles(java.io.FilenameFilter filter)
Operation is not supported. |
boolean |
mkdir()
The operation is not supported, always returns false |
boolean |
mkdirs()
The operation is not supported, always returns false |
boolean |
renameTo(java.io.File dest)
The operation is not supported, always returns false |
boolean |
setLastModified(long time)
The operation is not supported, always returns false |
boolean |
setReadOnly()
The operation is not supported, always returns false |
java.net.URI |
toURI()
|
java.net.URL |
toURL()
|
Methods inherited from class java.io.File |
---|
canExecute, createTempFile, createTempFile, getFreeSpace, getTotalSpace, getUsableSpace, hashCode, listRoots, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SFTPFileFile(com.sshtools.j2ssh.sftp.SftpFile sftpFile, javax.swing.filechooser.FileSystemView fileSystemView)
sftpFile
- The FTPFile instance to wrapfileSystemView
- The file system view which created this instance.Method Detail |
---|
public java.net.PasswordAuthentication getPasswordAuthentication()
public java.lang.String getHost()
public int getPort()
public com.sshtools.j2ssh.sftp.SftpFile getSftpFile()
public boolean isAbsolute()
isAbsolute
in class java.io.File
File.isAbsolute()
public boolean isDirectory()
isDirectory
in class java.io.File
File.isDirectory()
public boolean isFile()
isFile
in class java.io.File
File.isFile()
public long lastModified()
lastModified
in class java.io.File
File.lastModified()
public boolean canRead()
canRead
in class java.io.File
File.canRead()
public boolean canWrite()
above
.
canWrite
in class java.io.File
File.canWrite()
public int compareTo(java.io.File pathname)
compareTo
in interface java.lang.Comparable<java.io.File>
compareTo
in class java.io.File
File.compareTo(java.io.File)
public int compareTo(java.lang.Object o)
compareTo
in class java.io.File
Comparable.compareTo(java.lang.Object)
public boolean createNewFile() throws java.io.IOException
createNewFile
in class java.io.File
java.io.IOException
- Since this operation is not supported.File.createNewFile()
public boolean delete()
delete
in class java.io.File
java.lang.UnsupportedOperationException
- Since this operation is not
supported.File.delete()
public void deleteOnExit()
deleteOnExit
in class java.io.File
File.deleteOnExit()
public boolean equals(java.lang.Object obj)
equals
in class java.io.File
Object.equals(java.lang.Object)
public boolean exists()
true
always. Any file for which an FTPFile
instance can be got is assumed to exist.
exists
in class java.io.File
File.exists()
public java.io.File getAbsoluteFile()
getAbsoluteFile
in class java.io.File
File.getAbsoluteFile()
public java.lang.String getAbsolutePath()
getAbsolutePath
in class java.io.File
File.getAbsolutePath()
public java.io.File getCanonicalFile() throws java.io.IOException
getCanonicalFile
in class java.io.File
java.io.IOException
File.getCanonicalFile()
public java.lang.String getCanonicalPath() throws java.io.IOException
getCanonicalPath
in class java.io.File
java.io.IOException
File.getCanonicalPath()
public java.lang.String getName()
getName
in class java.io.File
File.getName()
public java.lang.String getParent()
null
.
getParent
in class java.io.File
File.getParent()
public java.io.File getParentFile()
null
.
getParentFile
in class java.io.File
File.getParentFile()
public java.lang.String getPath()
getPath
in class java.io.File
File.getPath()
public boolean isHidden()
isHidden
in class java.io.File
File.isHidden()
public long length()
length
in class java.io.File
File.length()
public java.lang.String[] list()
SFTPRemoteFileSystemView
for this.
list
in class java.io.File
File.list()
public java.lang.String[] list(java.io.FilenameFilter filter)
SFTPRemoteFileSystemView
for this.
list
in class java.io.File
File.list(java.io.FilenameFilter)
public java.io.File[] listFiles()
SFTPRemoteFileSystemView
for this.
listFiles
in class java.io.File
File.listFiles()
public java.io.File[] listFiles(java.io.FileFilter filter)
SFTPRemoteFileSystemView
for this.
listFiles
in class java.io.File
File.listFiles(java.io.FileFilter)
public java.io.File[] listFiles(java.io.FilenameFilter filter)
SFTPRemoteFileSystemView
for this.
listFiles
in class java.io.File
File.listFiles(java.io.FilenameFilter)
public boolean mkdir()
false
mkdir
in class java.io.File
File.mkdir()
public boolean mkdirs()
false
mkdirs
in class java.io.File
File.mkdirs()
public boolean renameTo(java.io.File dest)
false
renameTo
in class java.io.File
File.renameTo(java.io.File)
public boolean setLastModified(long time)
false
setLastModified
in class java.io.File
File.setLastModified(long)
public boolean setReadOnly()
false
setReadOnly
in class java.io.File
File.setReadOnly()
public java.net.URI toURI()
toURI
in class java.io.File
File.toURI()
public java.net.URL toURL() throws java.net.MalformedURLException
toURL
in class java.io.File
java.net.MalformedURLException
File.toURL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |