Sun Adapter for Batch/FTP

com.stc.connector.ssh.ftp.client.impl
Class SFTPClientImpl

java.lang.Object
  extended by com.stc.connector.ssh.SSHProvider
      extended by com.stc.connector.ssh.ftp.client.impl.SFTPClientImpl
All Implemented Interfaces:
com.maverick.ssh.HostKeyVerification, DirectoryProvider, SFTPClient

public class SFTPClientImpl
extends SSHProvider
implements SFTPClient

jim.fu@sun.com TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates


Field Summary
 
Fields inherited from class com.stc.connector.ssh.SSHProvider
iSSHVer, mCFG, mInterface, mSSHClient
 
Constructor Summary
SFTPClientImpl(SFTP intf, java.util.Map aParams)
           
 
Method Summary
 void cd(java.lang.String dir)
          change remote directory to dir
 void chgrp(java.lang.String gid, java.lang.String path)
          change the group of the file or directory specified by path to the group specified as gid;
 void chmod(int permissions, java.lang.String path)
          change the mode of the file or directory specified path to the mode as specified permissions; Changes the access permissions or modes of the specified file or directory.
 void chown(java.lang.String uid, java.lang.String path)
          change owner of the file or directory specified path to the user as specified uid;
 void connect()
          connect to the remote SSH server;
 java.lang.String currentDir()
           
 void delete()
          delete a remote file specified by configuration parameters RemoteDirectory and RemoteFile
 void delete(java.lang.String file)
          delete a remote file specified by file
 void disconnect()
          disconnect the client from the remote SSH server;
 void get()
          get data from remote SSH server (specified by configuration parameters RemoteDirectory and RemoteFile) to the local machine through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters LocalDirectory and LocalFile;
 void GET()
          get data from remote SSH server (specified by configuration parameters RemoteDirectory and RemoteFile) to the local machine through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters LocalDirectory and LocalFile; if there are pre and post operations configured, they will be applied before and after the get operation respectively;
 DirectoryEntry getEntry(int index)
          get the index(th) entry in the current entry list Note, current entry list is populated by calling listDir() or listDirLong();
 int getEntryCount()
          return the number of entries in the current entry list;
 java.lang.String getLocalDirNameStub()
          return the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;
 java.lang.String getLocalFileNameStub()
          return the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;
 byte[] getPayload()
          return the payload buffer - byte array;
 java.lang.String getRemoteDirNameStub()
          return the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;
 java.lang.String getRemoteFileNameStub()
          return the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;
 java.lang.String getResolvedLocalDirectory()
          Return the resolved local directory name;
 java.lang.String getResolvedLocalFile()
          Return the current resolved local file name;
 java.lang.String getResolvedRemoteDirectory()
          Return the current resolved remote directory name;
 java.lang.String getResolvedRemoteFile()
          Return the current resolved remote file name;
 boolean hasEntry()
          test if current entry list has entries;
 boolean isConnected()
          test if the client is connected to a remote SSH server;
 void lcd(java.lang.String dir)
          change local directory to dir
 void listDir()
          list all the entries under remote current directory and the result is cached on client side for navigation using methods hasEntry, nextEntry(), resetEntries(), getEntry(i), getEntryCount()
 GenericDirectoryEntry[] listDir(java.lang.String path)
           
 java.lang.String lpwd()
          return the local working directory as a path;
 void mkdir()
          create a remote directory as specified by configuration parameter RemoteDirectory;
 void mkdir(java.lang.String dir)
          create a remote directory as specified by dir
 void mkdirs(java.lang.String dir)
          create a remote directory as specified by dir
 DirectoryEntry nextEntry()
          return the next entry in the current entry list;
 void put()
          put data from local (specified by configuration parameters LocalDirectory and LocalFile) to the remote SSH server file specified by specified by configuration parameters RemoteDirectory and RemoteFile through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the local data could be from payload or a local file;
 void PUT()
          put data from local (specified by configuration parameters LocalDirectory and LocalFile) to the remote SSH server file specified by specified by configuration parameters RemoteDirectory and RemoteFile through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the local data could be from payload or a local file; if there are pre and post operations configured, they will be applied before and after the put operation respectively;
 java.lang.String pwd()
          return the current working directory of remote SSH server as a path;
 void rename(java.lang.String newPath)
          rename a remote path specified by configuration parameters RemoteDirectory and RemoteFile to a new remote path newPath;
 void rename(java.lang.String oldPath, java.lang.String newPath)
          rename a remote path oldPath to a new remote path newPath;
 boolean reset()
          internal life cycle methods reset the sftp client such as discard payload buffer
 void resetEntries()
          reset the current entry list so that next call to nextEntry() will return the first entry in the list;
 void resolveLocalAsDestination()
          before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the local dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.
 void resolveLocalAsSource()
          if the local dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;
 void resolveRemoteAsDestination()
          before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the remote dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.
 void resolveRemoteAsSource()
          if the remote dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;
 void setLocalDirNameStub(java.lang.String s)
          set the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;
 void setLocalFileNameStub(java.lang.String s)
          set the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;
 void setPayload(byte[] newPayload)
          set the payload buffer with newPayload
 void setRemoteDirNameStub(java.lang.String s)
          set the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;
 void setRemoteFileNameStub(java.lang.String s)
          set the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;
 void setResolvedLocalDirectory(java.lang.String s)
          Set the current resolved local directory name, should not be invoked directly from user collaboration;
 void setResolvedLocalFile(java.lang.String s)
          Set the current local file name to s, should not be invoked directly from user collaboration;
 void setResolvedRemoteDirectory(java.lang.String s)
          Set the current resolved remote directory name, should not be invoked directly from user collaboration;
 void setResolvedRemoteFile(java.lang.String s)
          Set the current resolved remote file name, should not be invoked directly from user collaboration;;
 SFTPFileAttributes stat(java.lang.String path)
          query the state information of the entity specified by path
 void terminate()
          internal life cycle method;
 void umask(int umask)
           
 void umask(java.lang.String umask)
          Sets the umask for this client.
 
Methods inherited from class com.stc.connector.ssh.SSHProvider
connectWithAuthentication, getConfiguration, verifyHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFTPClientImpl

public SFTPClientImpl(SFTP intf,
                      java.util.Map aParams)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

listDir

public GenericDirectoryEntry[] listDir(java.lang.String path)
                                throws java.lang.Exception
Specified by:
listDir in interface DirectoryProvider
Throws:
java.lang.Exception

currentDir

public java.lang.String currentDir()
                            throws java.lang.Exception
Specified by:
currentDir in interface DirectoryProvider
Throws:
java.lang.Exception

reset

public boolean reset()
              throws SFTPException
Description copied from interface: SFTPClient
internal life cycle methods reset the sftp client such as discard payload buffer

Specified by:
reset in interface SFTPClient
Returns:
Throws:
SFTPException

terminate

public void terminate()
               throws SFTPException
Description copied from interface: SFTPClient
internal life cycle method;

Specified by:
terminate in interface SFTPClient
Throws:
SFTPException

getPayload

public byte[] getPayload()
Description copied from interface: SFTPClient
return the payload buffer - byte array;

Specified by:
getPayload in interface SFTPClient
Returns:
payload buffer;

setPayload

public void setPayload(byte[] newPayload)
Description copied from interface: SFTPClient
set the payload buffer with newPayload

Specified by:
setPayload in interface SFTPClient

connect

public void connect()
             throws SFTPException
Description copied from interface: SFTPClient
connect to the remote SSH server;

Specified by:
connect in interface SFTPClient
Throws:
SFTPException

disconnect

public void disconnect()
                throws SFTPException
Description copied from interface: SFTPClient
disconnect the client from the remote SSH server;

Specified by:
disconnect in interface SFTPClient
Throws:
SFTPException

isConnected

public boolean isConnected()
                    throws SFTPException
Description copied from interface: SFTPClient
test if the client is connected to a remote SSH server;

Specified by:
isConnected in interface SFTPClient
Returns:
true if connected false otherwise;
Throws:
SFTPException

PUT

public void PUT()
         throws SFTPException
Description copied from interface: SFTPClient
put data from local (specified by configuration parameters LocalDirectory and LocalFile) to the remote SSH server file specified by specified by configuration parameters RemoteDirectory and RemoteFile through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the local data could be from payload or a local file; if there are pre and post operations configured, they will be applied before and after the put operation respectively;

Specified by:
PUT in interface SFTPClient
Throws:
SFTPException

put

public void put()
         throws SFTPException
Description copied from interface: SFTPClient
put data from local (specified by configuration parameters LocalDirectory and LocalFile) to the remote SSH server file specified by specified by configuration parameters RemoteDirectory and RemoteFile through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the local data could be from payload or a local file;

Specified by:
put in interface SFTPClient
Throws:
SFTPException

GET

public void GET()
         throws SFTPException
Description copied from interface: SFTPClient
get data from remote SSH server (specified by configuration parameters RemoteDirectory and RemoteFile) to the local machine through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters LocalDirectory and LocalFile; if there are pre and post operations configured, they will be applied before and after the get operation respectively;

Specified by:
GET in interface SFTPClient
Throws:
SFTPException

get

public void get()
         throws SFTPException
Description copied from interface: SFTPClient
get data from remote SSH server (specified by configuration parameters RemoteDirectory and RemoteFile) to the local machine through sftp; Note, the remote SSH server must have sftp sub system enabled; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters LocalDirectory and LocalFile;

Specified by:
get in interface SFTPClient
Throws:
SFTPException

cd

public void cd(java.lang.String dir)
        throws SFTPException
Description copied from interface: SFTPClient
change remote directory to dir

Specified by:
cd in interface SFTPClient
Throws:
SFTPException

lcd

public void lcd(java.lang.String dir)
         throws SFTPException
Description copied from interface: SFTPClient
change local directory to dir

Specified by:
lcd in interface SFTPClient
Throws:
SFTPException

pwd

public java.lang.String pwd()
                     throws SFTPException
Description copied from interface: SFTPClient
return the current working directory of remote SSH server as a path;

Specified by:
pwd in interface SFTPClient
Returns:
Throws:
SFTPException

lpwd

public java.lang.String lpwd()
                      throws SFTPException
Description copied from interface: SFTPClient
return the local working directory as a path;

Specified by:
lpwd in interface SFTPClient
Returns:
Throws:
SFTPException

mkdir

public void mkdir()
           throws SFTPException
Description copied from interface: SFTPClient
create a remote directory as specified by configuration parameter RemoteDirectory;

Specified by:
mkdir in interface SFTPClient
Throws:
SFTPException

mkdir

public void mkdir(java.lang.String dir)
           throws SFTPException
Description copied from interface: SFTPClient
create a remote directory as specified by dir

Specified by:
mkdir in interface SFTPClient
Throws:
SFTPException

mkdirs

public void mkdirs(java.lang.String dir)
            throws SFTPException
Description copied from interface: SFTPClient
create a remote directory as specified by dir

Specified by:
mkdirs in interface SFTPClient
Parameters:
dir - - a path to be created
Throws:
SFTPException

delete

public void delete(java.lang.String file)
            throws SFTPException
Description copied from interface: SFTPClient
delete a remote file specified by file

Specified by:
delete in interface SFTPClient
Parameters:
file - - the path to the file to be deleted;
Throws:
SFTPException

delete

public void delete()
            throws SFTPException
Description copied from interface: SFTPClient
delete a remote file specified by configuration parameters RemoteDirectory and RemoteFile

Specified by:
delete in interface SFTPClient
Throws:
SFTPException

rename

public void rename(java.lang.String oldPath,
                   java.lang.String newPath)
            throws SFTPException
Description copied from interface: SFTPClient
rename a remote path oldPath to a new remote path newPath;

Specified by:
rename in interface SFTPClient
Parameters:
oldPath - - existing path on remote SSH server;
newPath - - new name to be renamed to;
Throws:
SFTPException

rename

public void rename(java.lang.String newPath)
            throws SFTPException
Description copied from interface: SFTPClient
rename a remote path specified by configuration parameters RemoteDirectory and RemoteFile to a new remote path newPath;

Specified by:
rename in interface SFTPClient
Parameters:
newPath - - new name to be renamed to;
Throws:
SFTPException

getResolvedRemoteDirectory

public java.lang.String getResolvedRemoteDirectory()
Description copied from interface: SFTPClient
Return the current resolved remote directory name;

Specified by:
getResolvedRemoteDirectory in interface SFTPClient
Returns:
the resolved remote directory name

setResolvedRemoteDirectory

public void setResolvedRemoteDirectory(java.lang.String s)
Description copied from interface: SFTPClient
Set the current resolved remote directory name, should not be invoked directly from user collaboration;

Specified by:
setResolvedRemoteDirectory in interface SFTPClient
Parameters:
s - - the remote directory path;

getResolvedRemoteFile

public java.lang.String getResolvedRemoteFile()
Description copied from interface: SFTPClient
Return the current resolved remote file name;

Specified by:
getResolvedRemoteFile in interface SFTPClient
Returns:
the resolved name;

setResolvedRemoteFile

public void setResolvedRemoteFile(java.lang.String s)
Description copied from interface: SFTPClient
Set the current resolved remote file name, should not be invoked directly from user collaboration;;

Specified by:
setResolvedRemoteFile in interface SFTPClient
Parameters:
s - - the file name;

getResolvedLocalDirectory

public java.lang.String getResolvedLocalDirectory()
Description copied from interface: SFTPClient
Return the resolved local directory name;

Specified by:
getResolvedLocalDirectory in interface SFTPClient
Returns:
the resolved name;

setResolvedLocalDirectory

public void setResolvedLocalDirectory(java.lang.String s)
Description copied from interface: SFTPClient
Set the current resolved local directory name, should not be invoked directly from user collaboration;

Specified by:
setResolvedLocalDirectory in interface SFTPClient

getResolvedLocalFile

public java.lang.String getResolvedLocalFile()
Description copied from interface: SFTPClient
Return the current resolved local file name;

Specified by:
getResolvedLocalFile in interface SFTPClient
Returns:
the resolved name;

setResolvedLocalFile

public void setResolvedLocalFile(java.lang.String s)
Description copied from interface: SFTPClient
Set the current local file name to s, should not be invoked directly from user collaboration;

Specified by:
setResolvedLocalFile in interface SFTPClient
Parameters:
s - - the file name to be set;

resolveRemoteAsSource

public void resolveRemoteAsSource()
                           throws SFTPException
if the remote dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;

Specified by:
resolveRemoteAsSource in interface SFTPClient
Throws:
SFTPException

resolveLocalAsSource

public void resolveLocalAsSource()
                          throws SFTPException
if the local dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;

Specified by:
resolveLocalAsSource in interface SFTPClient
Throws:
SFTPException

resolveRemoteAsDestination

public void resolveRemoteAsDestination()
                                throws SFTPException
before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the remote dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.

Specified by:
resolveRemoteAsDestination in interface SFTPClient
Throws:
SFTPException

resolveLocalAsDestination

public void resolveLocalAsDestination()
                               throws SFTPException
before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the local dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.

Specified by:
resolveLocalAsDestination in interface SFTPClient
Throws:
SFTPException

getEntry

public DirectoryEntry getEntry(int index)
                        throws SFTPException
Description copied from interface: SFTPClient
get the index(th) entry in the current entry list Note, current entry list is populated by calling listDir() or listDirLong();

Specified by:
getEntry in interface SFTPClient
Returns:
entry - the index(th) entry;
Throws:
SFTPException

nextEntry

public DirectoryEntry nextEntry()
                         throws SFTPException
Description copied from interface: SFTPClient
return the next entry in the current entry list;

Specified by:
nextEntry in interface SFTPClient
Returns:
Throws:
SFTPException

hasEntry

public boolean hasEntry()
Description copied from interface: SFTPClient
test if current entry list has entries;

Specified by:
hasEntry in interface SFTPClient
Returns:
true - has entries false otherwise;

getEntryCount

public int getEntryCount()
Description copied from interface: SFTPClient
return the number of entries in the current entry list;

Specified by:
getEntryCount in interface SFTPClient
Returns:

resetEntries

public void resetEntries()
Description copied from interface: SFTPClient
reset the current entry list so that next call to nextEntry() will return the first entry in the list;

Specified by:
resetEntries in interface SFTPClient

listDir

public void listDir()
             throws SFTPException
Description copied from interface: SFTPClient
list all the entries under remote current directory and the result is cached on client side for navigation using methods hasEntry, nextEntry(), resetEntries(), getEntry(i), getEntryCount()

Specified by:
listDir in interface SFTPClient
Throws:
SFTPException

getLocalFileNameStub

public java.lang.String getLocalFileNameStub()
Description copied from interface: SFTPClient
return the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
getLocalFileNameStub in interface SFTPClient
Returns:
current name stub for local file;

setLocalFileNameStub

public void setLocalFileNameStub(java.lang.String s)
Description copied from interface: SFTPClient
set the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
setLocalFileNameStub in interface SFTPClient

getLocalDirNameStub

public java.lang.String getLocalDirNameStub()
Description copied from interface: SFTPClient
return the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
getLocalDirNameStub in interface SFTPClient
Returns:
current name stub for local directory;

setLocalDirNameStub

public void setLocalDirNameStub(java.lang.String s)
Description copied from interface: SFTPClient
set the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
setLocalDirNameStub in interface SFTPClient

getRemoteFileNameStub

public java.lang.String getRemoteFileNameStub()
Description copied from interface: SFTPClient
return the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
getRemoteFileNameStub in interface SFTPClient
Returns:
current name stub for remote file;

setRemoteFileNameStub

public void setRemoteFileNameStub(java.lang.String s)
Description copied from interface: SFTPClient
set the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
setRemoteFileNameStub in interface SFTPClient

getRemoteDirNameStub

public java.lang.String getRemoteDirNameStub()
Description copied from interface: SFTPClient
return the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
getRemoteDirNameStub in interface SFTPClient
Returns:
current name stub for remote directory;

setRemoteDirNameStub

public void setRemoteDirNameStub(java.lang.String s)
Description copied from interface: SFTPClient
set the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;

Specified by:
setRemoteDirNameStub in interface SFTPClient

chgrp

public void chgrp(java.lang.String gid,
                  java.lang.String path)
           throws SFTPException
Description copied from interface: SFTPClient
change the group of the file or directory specified by path to the group specified as gid;

Specified by:
chgrp in interface SFTPClient
Parameters:
gid - - numeric group id for the new group
path - - the path to the remote file/directory
Throws:
SFTPException - - any error occurred

chown

public void chown(java.lang.String uid,
                  java.lang.String path)
           throws SFTPException
Description copied from interface: SFTPClient
change owner of the file or directory specified path to the user as specified uid;

Specified by:
chown in interface SFTPClient
Parameters:
uid - - numeric user id of the new owner
path - - the path to the remote file/directory
Throws:
SFTPException - - any error occurred

chmod

public void chmod(int permissions,
                  java.lang.String path)
           throws SFTPException
Description copied from interface: SFTPClient
change the mode of the file or directory specified path to the mode as specified permissions; Changes the access permissions or modes of the specified file or directory. Modes determine who can read, change or execute a file. Absolute modes are octal numbers specifying the complete list of attributes for the files; you specify attributes by OR'ing together these bits. 0400 Individual read 0200 Individual write 0100 Individual execute (or list directory) 0040 Group read 0020 Group write 0010 Group execute 0004 Other read 0002 Other write 0001 Other execute

Specified by:
chmod in interface SFTPClient
Parameters:
permissions - - the absolute mode of the file/directory (an octal value)
path - - the path to the remote file/directory
Throws:
SFTPException - - any error occurred

umask

public void umask(java.lang.String umask)
           throws SFTPException
Description copied from interface: SFTPClient
Sets the umask for this client. To give yourself full permissions for both files and directories and prevent the group and other users from having access: umask("077"); This subtracts 077 from the system defaults for files and directories 666 and 777. Giving a default access permissions for your files of 600 (rw-------) and for directories of 700 (rwx------). To give all access permissions to the group and allow other users read and execute permission: umask("002"); This subtracts 002 from the sytem defaults to give a default access permission for your files of 664 (rw-rw-r--) and for your directories of 775 (rwxrwxr-x). To give the group and other users all access except write access: umask("022"); This subtracts 022 from the system defaults to give a default access permission for your files of 644 (rw-r--r--) and for your directories of 755 (rwxr-xr-x).

Specified by:
umask in interface SFTPClient
Parameters:
umask - - three digit umask in octal
Throws:
SFTPException - - any error occurred

umask

public void umask(int umask)
           throws SFTPException
Specified by:
umask in interface SFTPClient
Throws:
SFTPException

stat

public SFTPFileAttributes stat(java.lang.String path)
                        throws SFTPException
Description copied from interface: SFTPClient
query the state information of the entity specified by path

Specified by:
stat in interface SFTPClient
Parameters:
path - - path pointing to the directory or file entity whose state information will be returned;
Returns:
SFTPFileAttributes - state information for the entity specified by path
Throws:
SFTPException - - any error occurred

Sun Adapter for Batch/FTP