|
Secure iNet Factory | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Abstract interface for performing file transfer operations using FTP, FTPS (FTP over SSL) and SFTP (FTP over SSH) protocols.
Example Usage:
FileTransfer ftp = new FtpFileTransfer(hostname,username,password); ftp.connect(); System.out.println(ftp.getDirListingAsString()); ftp.disconnect();
FtpTransfer,
FtpsTransfer,
SftpTransfer,
FtpsImplicitTransfer| Field Summary | |
static int |
ASCII
Flag to indicate that ASCII transfer mode is used. |
static int |
AUTO
Flag to indicate that automatic transfer mode detection is used. |
static int |
BINARY
Flag to indicate that BINARY transfer mode is used. |
static java.lang.String |
CURRENT_DIR
Represents the current directory. |
static java.lang.String |
UP_DIR
Represents the parent directory of current directory. |
| Method Summary | |
void |
addFileTransferListener(FileTransferListener listener)
Adds FileTransferListener. |
void |
clearProxySettings()
Clears proxy server values. |
void |
connect()
Connects to server and performs login. |
void |
deleteDir(java.lang.String name)
Deletes directory from server. |
void |
deleteDir(java.lang.String name,
boolean recursive)
Deletes directory from server. |
void |
deleteFile(java.lang.String remoteFile)
Deletes remote file from server. |
void |
disconnect()
Quits session and disconnects from server. |
void |
download(java.io.OutputStream out,
java.lang.String remoteFile)
Downloads file from server and writes contents to provided OutputStream. |
java.io.File |
download(java.lang.String remoteFile)
Downloads file from server. |
java.io.File |
download(java.lang.String localFile,
java.lang.String remoteFile)
Downloads file from server. |
void |
downloadDir(java.lang.String remoteDir)
Downloads remote directory and contents recursively from server. |
void |
downloadDir(java.lang.String remoteDir,
int retryLimit,
boolean performChecksum)
Downloads remote directory and contents. |
int |
getBlockTransferSize()
Gets blocksize for use in transferring files. |
boolean |
getDebug()
Gets debugging state. |
java.io.PrintStream |
getDebugStream()
Gets PrintStream used in reporting debug statements. |
java.lang.String |
getDir()
Gets current working directory of server. |
java.util.Enumeration |
getDirListing()
Gets directory listing from server. |
java.util.Enumeration |
getDirListing(java.lang.String filter)
Gets file listing of files matching regular expression. |
java.lang.String |
getDirListingAsString()
Gets directory listing of files on server. |
java.lang.String |
getDirListingAsString(java.lang.String filter)
Gets file listing of files matching regular expression. |
long |
getFilesize(java.lang.String remoteFile)
Gets filesize of remote file from server. |
java.util.Date |
getFileTimestamp(java.lang.String remoteFile)
Gets date/timestamp of remote file from server. |
java.lang.String |
getHostname()
Gets hostname of server. |
java.lang.Object |
getImplementation()
Gets underlying file transfer instance. |
java.io.InputStream |
getInputStream(java.lang.String remoteFile,
long pos)
Gets InputStream for remote file for reading. |
java.io.File |
getLocalDir()
Gets local directory to be used in session. |
java.util.Enumeration |
getLocalDirListing()
Gets local directory listing. |
int |
getMode()
Gets data transfer mode for current session. |
java.util.Enumeration |
getNameListing()
Gets directory listing of files on server. |
java.util.Enumeration |
getNameListing(java.lang.String filter)
Gets directory listing of files on server matching regular expression. |
java.io.OutputStream |
getOutputStream(java.lang.String fileName,
long off,
boolean append)
Gets OutputStream for writing to remote file. |
boolean |
getPassive()
Gets whether passive mode is used for FTP connections. |
java.lang.String |
getPassword()
Gets password. |
int |
getPort()
Gets server port. |
int |
getTimeout()
Gets the timeout for opening connection to server. |
java.lang.String |
getUsername()
Gets username. |
java.lang.String |
getWireEncoding()
Gets encoding set used when issuing commands and transferring files. |
void |
interrupt()
Interrupts the current data transfer and sets interrupted flag to true. |
boolean |
interrupted()
Checks if transfer process was interrupted. |
boolean |
isConnected()
Checks if client is connected to server. |
void |
makeDir(java.lang.String name)
Makes directory on server. |
void |
makeDirRecursive(java.lang.String name)
Makes directory on server, creating subdirectories if necessary. |
java.io.File |
makeLocalDir(java.lang.String name)
Creates local directory. |
void |
mdelete(java.lang.String filter)
Deletes multiple files in servers current directory matching regular expression. |
void |
mdownload(java.util.Enumeration fileNames)
Downloads specified files in current working remote directory from server to local directory. |
void |
mdownload(java.lang.String filter)
Downloads multiple files matching regular expression from server's current directory. |
void |
mupload(java.util.Enumeration fileNames)
Uploads multiple files to server. |
void |
mupload(java.lang.String filter)
Uploads multiple files matching regular expression to server's current directory. |
void |
removeFileTransferListener(FileTransferListener listener)
Removes specified FileTransferListener. |
void |
renameFile(java.lang.String remoteFile,
java.lang.String newFile)
Renames remote file on server. |
void |
reset()
Resets the interrupted flag to false. |
void |
resumeDownload(java.lang.String remoteFile,
long offset)
Resumes download of file from server. |
void |
resumeDownload(java.lang.String localFile,
java.lang.String remoteFile,
long offset)
Resumes download of file from server. |
void |
resumeUpload(java.io.File file,
long offset)
Resumes upload of file to server. |
void |
resumeUpload(java.lang.String file,
long offset)
Resumes upload of file to server. |
void |
setAscii()
Sets data transfer mode to ASCII. |
void |
setAuto(boolean auto)
Sets data transfer mode to automatically detect transfer mode. |
void |
setBinary()
Sets data transfer mode to binary. |
void |
setBlockTransferSize(int blocksize)
Sets block size for use in transferring files. |
void |
setDebug(boolean debug)
Sets debugging state. |
void |
setDebugStream(java.io.PrintStream ps)
Sets PrintStream used in reporting debug statements. |
void |
setDir(java.lang.String name)
Sets current directory on server. |
void |
setDirUp()
Sets current directory on server to parent directory. |
void |
setFileTimestamp(java.lang.String remoteFile,
java.util.Date dateFile)
Sets date/timestamp of remote file from server When using the FTP/S protocols the MDTM command is used. |
void |
setHostname(java.lang.String host)
Sets hostname of server. |
void |
setLocalDir(java.io.File dir)
Sets local directory to be used in session. |
void |
setPassive(boolean passive)
Sets whether passive mode is used for FTP connections. |
void |
setPassword(java.lang.String password)
Sets password. |
void |
setPort(int port)
Sets port of remote server. |
void |
setProxyAuthentication(java.lang.String proxyUsername,
java.lang.String proxyPassword)
Sets the proxy authentication username and password to use with proxy server. |
void |
setProxyHost(java.lang.String proxyHostname,
int proxyPort)
Sets the proxy hostname and port for this connection. |
void |
setProxyType(java.lang.String proxyType)
Sets the proxy type will be used for this connection. |
void |
setTimeout(int timeout)
Sets the timeout for opening connection to server. |
void |
setUsername(java.lang.String username)
Sets username. |
void |
setWireEncoding(java.lang.String encoding)
Sets encoding set used when issuing commands and transferring files. |
void |
upload(byte[] data,
java.lang.String name)
Uploads file to server where contents of file is not on disk but in memory. |
void |
upload(byte[] data,
java.lang.String name,
boolean append)
Uploads file to server where contents of file is not on disk but in memory. |
void |
upload(java.io.File file)
Uploads file to server. |
void |
upload(java.io.File file,
boolean append)
Uploads file to server. |
void |
upload(java.io.File file,
java.lang.String remoteName)
Uploads file to server. |
void |
upload(java.io.File file,
java.lang.String remoteName,
boolean append)
Uploads file to server. |
void |
upload(java.lang.String name)
Uploads file to server. |
void |
upload(java.lang.String name,
boolean append)
Uploads file to server. |
void |
upload(java.lang.String extension,
java.io.File file)
Uploads file to server with the specified temporary extension. |
void |
upload(java.lang.String name,
java.lang.String remoteName)
Uploads file to server. |
void |
upload(java.lang.String name,
java.lang.String remoteName,
boolean append)
Uploads file to server. |
void |
uploadDir(java.io.File localDir)
Uploads local directory and contents recursively to server. |
void |
uploadDir(java.io.File localDir,
int retryLimit,
boolean performChecksum,
java.lang.String extension)
Uploads local directory and contents. |
void |
uploadDir(java.io.File localDir,
java.lang.String extension)
Uploads local directory and contents recursively to server. |
java.lang.String |
uploadUnique(java.io.File file)
Uploads the file which is created in the current directory under a name unique to that directory. |
java.lang.String |
uploadUnique(java.io.InputStream in,
java.lang.String fileName)
Uploads the file which is created in the current directory under a name unique to that directory. |
java.lang.String |
uploadUnique(java.lang.String fileName)
Uploads the file which is created in the current directory under a name unique to that directory. |
| Field Detail |
public static final int AUTO
getMode(),
Constant Field Valuespublic static final int ASCII
getMode(),
Constant Field Valuespublic static final int BINARY
getMode(),
Constant Field Valuespublic static final java.lang.String CURRENT_DIR
public static final java.lang.String UP_DIR
| Method Detail |
public void connect()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setUsername(java.lang.String),
setPassword(java.lang.String)
public void deleteDir(java.lang.String name)
throws com.jscape.filetransfer.FileTransferException
name - the directory to remove
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void deleteDir(java.lang.String name,
boolean recursive)
throws com.jscape.filetransfer.FileTransferException
recursive
parameter will be used to determine if files and subdirectories within
directory should be removed.
name - the directory to removerecursive - true if it should delete files and subdirectories within directory
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void deleteFile(java.lang.String remoteFile)
throws com.jscape.filetransfer.FileTransferException
remoteFile - name of file to delete
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void disconnect()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void download(java.io.OutputStream out,
java.lang.String remoteFile)
throws com.jscape.filetransfer.FileTransferException
OutputStream.
Closure of OutputStream is responsibility of programmer.
out - the OutputStream to write download toremoteFile - remote filename
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public java.io.File download(java.lang.String remoteFile)
throws com.jscape.filetransfer.FileTransferException
remoteFile - the file to download
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public java.io.File download(java.lang.String localFile,
java.lang.String remoteFile)
throws com.jscape.filetransfer.FileTransferException
localFile - destination filenameremoteFile - remote filename
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void downloadDir(java.lang.String remoteDir)
throws com.jscape.filetransfer.FileTransferException
remoteDir - the directory to download
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void downloadDir(java.lang.String remoteDir,
int retryLimit,
boolean performChecksum)
throws com.jscape.filetransfer.FileTransferException
remoteDir - the directory to downloadretryLimit - retry limit if download failsperformChecksum - whether or not to perform checksum after download, only supported in FTP/S protocols and not by all FTP servers
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.public boolean getDebug()
true if debugging is onpublic java.io.PrintStream getDebugStream()
PrintStream is System.out.
PrintStream used in reporting debug statementsPrintStream
public java.lang.String getDir()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public java.util.Enumeration getDirListing()
throws com.jscape.filetransfer.FileTransferException
Enumeration of FileTransferRemoteFile objects
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.getDirListingAsString(String),
getNameListing()
public java.util.Enumeration getDirListing(java.lang.String filter)
throws com.jscape.filetransfer.FileTransferException
filter - the filename filter
Enumeration of FileTransferRemoteFile objects
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.getDirListingAsString(String),
getNameListing()
public java.lang.String getDirListingAsString()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public java.lang.String getDirListingAsString(java.lang.String filter)
throws com.jscape.filetransfer.FileTransferException
filter - a filename filter
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public long getFilesize(java.lang.String remoteFile)
throws com.jscape.filetransfer.FileTransferException
remoteFile - the remote file
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.
public java.util.Date getFileTimestamp(java.lang.String remoteFile)
throws com.jscape.filetransfer.FileTransferException
remoteFile - the remote file
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void setFileTimestamp(java.lang.String remoteFile,
java.util.Date dateFile)
throws com.jscape.filetransfer.FileTransferException
remoteFile - the remote filedateFile - the new date/timestamp
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.public java.lang.String getHostname()
public java.io.File getLocalDir()
public java.util.Enumeration getLocalDirListing()
java.util.Enumeration of Filepublic int getMode()
AUTO,
BINARY,
ASCII
public java.util.Enumeration getNameListing()
throws com.jscape.filetransfer.FileTransferException
Enumeration of String where each item represents a file
or directory name
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public java.util.Enumeration getNameListing(java.lang.String filter)
throws com.jscape.filetransfer.FileTransferException
filter - the filename filter
Enumeration of String where each item represents a file
or directory name
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurspublic boolean getPassive()
true if passive mode is used, false otherwisepublic java.lang.String getPassword()
public int getPort()
public int getTimeout()
public java.lang.String getUsername()
public void setWireEncoding(java.lang.String encoding)
encoding - the character encoding to be usedpublic java.lang.String getWireEncoding()
public void interrupt()
true.
After invoking this method you must reset the interrupted flag to false.
before transferring any files.
reset()public boolean interrupted()
true if transfer process was interrupted.public boolean isConnected()
true if connected false otherwise
public void makeDir(java.lang.String name)
throws com.jscape.filetransfer.FileTransferException
name - name of directory to make
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void makeDirRecursive(java.lang.String name)
throws com.jscape.filetransfer.FileTransferException
name - full path of directory to make
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurspublic java.io.File makeLocalDir(java.lang.String name)
name - name of directory
getLocalDir()
public void mdelete(java.lang.String filter)
throws com.jscape.filetransfer.FileTransferException
filter - the regular expression filter to use
com.jscape.filetransfer.FileTransferException - if an error occurs.
public void mdownload(java.util.Enumeration fileNames)
throws com.jscape.filetransfer.FileTransferException
downloadDir(String) method.
Downloads are stored relative to current local directory.
fileNames - filenames of files to download
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File),
downloadDir(String)
public void mdownload(java.lang.String filter)
throws com.jscape.filetransfer.FileTransferException
downloadDir method.
filter - the regular expression to use
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File),
downloadDir(java.lang.String)
public void mupload(java.util.Enumeration fileNames)
throws com.jscape.filetransfer.FileTransferException
fileNames - filenames of files to upload
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void mupload(java.lang.String filter)
throws com.jscape.filetransfer.FileTransferException
filter - the regular expression to use
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void renameFile(java.lang.String remoteFile,
java.lang.String newFile)
throws com.jscape.filetransfer.FileTransferException
remoteFile - name of file to renamenewFile - new name of file
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.public void reset()
false.
This method should be invoked if you have interrupted a transfer using the
interrupt method and wish to resume transfering files.
interrupt()
public void resumeDownload(java.lang.String remoteFile,
long offset)
throws com.jscape.filetransfer.FileTransferException
remoteFile - the file to downloadoffset - file offset in bytes
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void resumeDownload(java.lang.String localFile,
java.lang.String remoteFile,
long offset)
throws com.jscape.filetransfer.FileTransferException
localFile - local file nameremoteFile - the file to downloadoffset - file offset in bytes
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void resumeUpload(java.io.File file,
long offset)
throws com.jscape.filetransfer.FileTransferException
file - the local file to uploadoffset - file offset in bytes
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void resumeUpload(java.lang.String file,
long offset)
throws com.jscape.filetransfer.FileTransferException
file - the local file to uploadoffset - file offset in bytes
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void setAscii()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void setAuto(boolean auto)
throws com.jscape.filetransfer.FileTransferException
auto - true to turn automatic detect on false to turn off
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void setBinary()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.public void setDebug(boolean debug)
System.out.
debug - true to turn debugging onsetDebugStream(java.io.PrintStream)public void setDebugStream(java.io.PrintStream ps)
PrintStream used in reporting debug statements.
Default debug stream is System.out.
ps - the PrintStream to send debug statements toPrintStream
public void setDir(java.lang.String name)
throws com.jscape.filetransfer.FileTransferException
name - the remote directory
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.
public void setDirUp()
throws com.jscape.filetransfer.FileTransferException
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.public void setHostname(java.lang.String host)
host - the hostname or IP address of serverpublic void setLocalDir(java.io.File dir)
dir - the local directorypublic void setPassive(boolean passive)
passive - if true, the transfers will be passive.public void setPassword(java.lang.String password)
password - the passwordpublic void setPort(int port)
port - the portpublic void setTimeout(int timeout)
timeout - the timeout in millisecondspublic void setUsername(java.lang.String username)
username - the username
public void upload(byte[] data,
java.lang.String name)
throws com.jscape.filetransfer.FileTransferException
data - the raw contents of the file to uploadname - the filename to store file as on FTP server
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public void upload(byte[] data,
java.lang.String name,
boolean append)
throws com.jscape.filetransfer.FileTransferException
data - the raw contents of the file to uploadname - the filename to store file as on serverappend - true to append to remote file on FTP server, false otherwise
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public void upload(java.io.File file)
throws com.jscape.filetransfer.FileTransferException
file is a directory then directory and entire contents are uploaded.
file - the local file to upload
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public void upload(java.io.File file,
boolean append)
throws com.jscape.filetransfer.FileTransferException
file is a directory then directory and entire contents are uploaded.
file - the local file to uploadappend - true to append to remote file on server, false otherwise
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public void upload(java.lang.String extension,
java.io.File file)
throws com.jscape.filetransfer.FileTransferException
extension - the temporary extension to use when uploading the filefile - the file to be uploaded
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs
public void upload(java.io.File file,
java.lang.String remoteName)
throws com.jscape.filetransfer.FileTransferException
file is a directory then directory and entire contents are uploaded.
file - the local file to uploadremoteName - the destination filename of upload
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public void upload(java.io.File file,
java.lang.String remoteName,
boolean append)
throws com.jscape.filetransfer.FileTransferException
file is a directory then directory and entire contents are uploaded.
file - the local file to uploadremoteName - the destination filename of uploadappend - true to append to remote file on server, false otherwise
com.jscape.filetransfer.FileTransferException - if an I/O or server related error occurs
public void upload(java.lang.String name)
throws com.jscape.filetransfer.FileTransferException
name - the local file to upload
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void upload(java.lang.String name,
boolean append)
throws com.jscape.filetransfer.FileTransferException
name - the local file to uploadappend - true to append to remote file on server, false otherwise
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void upload(java.lang.String name,
java.lang.String remoteName)
throws com.jscape.filetransfer.FileTransferException
name - the local file to uploadremoteName - the destination of upload
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public void upload(java.lang.String name,
java.lang.String remoteName,
boolean append)
throws com.jscape.filetransfer.FileTransferException
name - the local file to uploadremoteName - the destination of uploadappend - true to append to remote file on FTP server, false otherwise
com.jscape.filetransfer.FileTransferException - if an I/O or server error occurs.setLocalDir(java.io.File)
public java.lang.String uploadUnique(java.lang.String fileName)
throws com.jscape.filetransfer.FileTransferException
fileName - the file to be uploaded relative to current local directory
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.setLocalDir(File)
public java.lang.String uploadUnique(java.io.File file)
throws com.jscape.filetransfer.FileTransferException
file - the file to be uploaded
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.
public java.lang.String uploadUnique(java.io.InputStream in,
java.lang.String fileName)
throws com.jscape.filetransfer.FileTransferException
in - the InputStream to upload file fromfileName - the filename to be used as seed value for determining unique filename
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.
public void uploadDir(java.io.File localDir)
throws com.jscape.filetransfer.FileTransferException
localDir - the directory to upload
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.
public void uploadDir(java.io.File localDir,
java.lang.String extension)
throws com.jscape.filetransfer.FileTransferException
localDir - the directory to uploadextension - The extension file name used to upload each file
com.jscape.filetransfer.FileTransferException - if an I/O or protocol error occurs.
public void uploadDir(java.io.File localDir,
int retryLimit,
boolean performChecksum,
java.lang.String extension)
throws com.jscape.filetransfer.FileTransferException
localDir - the directory to uploadretryLimit - retry number when an error occursperformChecksum - whether or not to perform checksum verificationextension - the temporary extension which will be used when uploading files or null to use current extension
com.jscape.filetransfer.FileTransferException - if an I/O or protocol related error occurs.public void addFileTransferListener(FileTransferListener listener)
listener - the listener to addFileTransferListenerpublic void setBlockTransferSize(int blocksize)
blocksize - the blocksize in bytespublic int getBlockTransferSize()
public void removeFileTransferListener(FileTransferListener listener)
listener - the listener to removeFileTransferListener
public void setProxyHost(java.lang.String proxyHostname,
int proxyPort)
proxyHostname - the hostname or ip address of the proxy serverproxyPort - the port of the proxy server to connect toclearProxySettings()
public void setProxyAuthentication(java.lang.String proxyUsername,
java.lang.String proxyPassword)
proxyUsername - the proxy usernameproxyPassword - the proxy passwordclearProxySettings()public void setProxyType(java.lang.String proxyType)
proxyType - The proxy type. Values allowed: HTTP, SOCKS5public void clearProxySettings()
public java.io.InputStream getInputStream(java.lang.String remoteFile,
long pos)
throws com.jscape.filetransfer.FileTransferException
InputStream for remote file for reading.
remoteFile - the remote file to get InputStream forpos - the byte offset, 0 to get full file
InputStream
com.jscape.filetransfer.FileTransferException - if an I/O or protocol related error occurspublic java.lang.Object getImplementation()
Ftp, Ftps or SftpFtp,
Ftps,
com.jscpae.inet.sftp.Sftp
public java.io.OutputStream getOutputStream(java.lang.String fileName,
long off,
boolean append)
throws com.jscape.filetransfer.FileTransferException
OutputStream for writing to remote file.
fileName - the remote filenameoff - the byte offset, 0 to write at beginning of fileappend - true to append to remote file, false otherwise
OutputStream
com.jscape.filetransfer.FileTransferException - if an I/O or protocol related error occurs
|
Secure iNet Factory | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||