|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.glub.secureftp.bean.FTP
public class FTP
The FTP class is responsible for handling the basic operations
of the File Transfer Protocol.
| Field Summary | |
|---|---|
static short |
ACTIVE_CONNECTION_TYPE
Used to set the data connection type to active. |
static short |
ASCII_TRANSFER_MODE
Used to set the data transfer mode to ascii. |
static short |
AUTO_TRANSFER_MODE
Used to set the data transfer mode to auto. |
static short |
BINARY_TRANSFER_MODE
Used to set the data transfer mode to binary; also
known as image. |
protected FTPCommand |
command
This handles the FTP commands. |
static short |
EBCDIC_TRANSFER_MODE
Used to set the data transfer mode to ebcdic. |
protected boolean |
isConnected
If we are connected, this is true. |
protected boolean |
isLoggedIn
If we are logged in, this is true. |
protected int |
lastPortFromRange
These values are used if an active port range is specifed |
protected int |
maxPortInRange
|
protected int |
minPortInRange
|
protected boolean |
modeZEnabled
If mode z is enabled, this is true. |
static short |
PASSIVE_CONNECTION_TYPE
Used to set the data connection type to passive. |
static short |
PASV_CONNECTION_TYPE
Used to set the data connection type to passive. |
protected java.io.OutputStream |
recvCmdStream
This stream is used to print the responses returned from the server. |
protected java.io.OutputStream |
sendCmdStream
This stream is used to print the commands sent to the server. |
| Constructor Summary | |
|---|---|
FTP(HostInfo hostInfo)
Create a new FTP object without response notification. |
|
FTP(HostInfo hostInfo,
java.io.OutputStream sendCmdStream,
java.io.OutputStream recvCmdStream)
Create a new FTP object with response notification. |
|
FTP(java.lang.String host,
int port)
Create a new FTP object without response notification. |
|
FTP(java.lang.String host,
int port,
java.io.OutputStream sendCmdStream,
java.io.OutputStream recvCmdStream)
Create a new FTP object with response notification. |
|
| Method Summary | |
|---|---|
void |
abort(FTPAbortableTransfer abort)
Abort a data transfer from the FTP server. |
protected void |
aboutToTransferData()
Called before data transfers begin. |
void |
append(java.io.File file,
RemoteFile appendTo)
Append to a file on the FTP server. |
void |
append(java.io.File file,
RemoteFile appendTo,
FTPAbortableTransfer abort)
Append to a file on the FTP server with the ability to abort the data transfer. |
void |
append(java.io.File file,
RemoteFile appendTo,
Progress progress)
Append to a file on the FTP server with progress information. |
void |
append(java.io.File file,
RemoteFile appendTo,
Progress progress,
FTPAbortableTransfer abort)
Append to a file on the FTP server with progress information and the ability to abort the data transfer. |
void |
append(java.io.File file,
java.lang.String appendTo)
Append to a file on the FTP server. |
void |
append(java.io.File file,
java.lang.String appendTo,
FTPAbortableTransfer abort)
Append to a file on the FTP server with the ability to abort the data transfer. |
void |
append(java.io.File file,
java.lang.String appendTo,
Progress progress)
Append to a file on the FTP server with progress information. |
void |
append(java.io.File file,
java.lang.String appendTo,
Progress progress,
FTPAbortableTransfer abort)
Append to a file on the FTP server with progress information and the ability to abort the data transfer. |
void |
append(java.io.InputStream inputStream,
long localFileSize,
RemoteFile appendTo,
Progress progress)
Append to a file on the FTP server with progress information. |
void |
append(java.io.InputStream inputStream,
long localFileSize,
RemoteFile appendTo,
Progress progress,
FTPAbortableTransfer abort)
Append to a file on the FTP server with progress information and the ability to abort the data transfer. |
void |
append(java.io.InputStream inputStream,
long localFileSize,
java.lang.String appendTo,
Progress progress)
Append to a file on the FTP server with progress information. |
void |
append(java.io.InputStream inputStream,
long localFileSize,
java.lang.String appendTo,
Progress progress,
FTPAbortableTransfer abort)
Append to a file on the FTP server with progress information and the ability to abort the data transfer. |
void |
append(java.io.InputStream inputStream,
RemoteFile appendTo)
Append to a file on the FTP server. |
void |
append(java.io.InputStream inputStream,
RemoteFile appendTo,
FTPAbortableTransfer abort)
Append to a file on the FTP server with the ability to abort the data transfer. |
void |
append(java.io.InputStream inputStream,
java.lang.String appendTo)
Append to a file on the FTP server. |
void |
append(java.io.InputStream inputStream,
java.lang.String appendTo,
FTPAbortableTransfer abort)
Append to a file on the FTP server with the ability to abort the data transfer. |
void |
ascii()
Set the data transfer mode to ascii. |
void |
auto()
Set the data transfer mode to auto. |
void |
binary()
Set the data transfer mode to binary (or image). |
void |
cdup()
Change up one directory on the FTP server. |
void |
chdir(RemoteFile dir)
Change to a remote directory on the FTP server. |
void |
chdir(java.lang.String dir)
Change to a remote directory on the FTP server. |
void |
connect()
Connect to the FTP host and port. |
void |
delete(RemoteFile fileName)
Delete a file from the FTP server. |
void |
delete(java.lang.String fileName)
Delete a file from the FTP server. |
void |
ebcdic()
Set the data transfer mode to ebcdic. |
void |
forcePasvToUseControlIP(boolean on)
Forces passive data transfers to use the control socket IP address. |
java.lang.String |
getAccount()
Get the account name. |
int |
getConnectionType()
The data connection type is either passive or active. |
java.net.Socket |
getControlSocket()
Get the control socket. |
static java.lang.String |
getDateStamp()
The datestamp of the bean. |
FTPCommand |
getFTPCommand()
Get the FTPCommand object. |
java.lang.String |
getHostName()
Get the hostname of the FTP server. |
short |
getListStyle()
Get the server listing style of the FTP server. |
java.lang.String |
getPassword()
Get the password. |
int |
getPort()
Get the port of the FTP server. |
protected int |
getPortFromRange()
|
short |
getTransferMode()
The data transfer mode is either auto, ascii, or binary (image). |
java.lang.String |
getUser()
Get the username. |
static java.lang.String |
getVersion()
The version of the bean. |
java.lang.String |
help(java.lang.String item)
Get the server's remote help. |
boolean |
isConnected()
Whether or not currently connected. |
boolean |
isLoggedIn()
Whether or not currently logged in. |
boolean |
isTransferRestartable()
Whether or not the server supports restarting broken data transfers. |
RemoteFileList |
list()
List the current remote directory. |
RemoteFileList |
list(FTPAbortableTransfer abort)
List the current remote directory with the ability to abort the listing. |
RemoteFileList |
list(RemoteFile file)
List items on the remote FTP server. |
RemoteFileList |
list(RemoteFile file,
FTPAbortableTransfer abort,
boolean showHidden)
List items on the remote FTP server with the ability to abort the listing. |
RemoteFileList |
list(java.lang.String itemsToList)
List items on the remote FTP server. |
RemoteFileList |
list(java.lang.String itemsToList,
FTPAbortableTransfer abort,
boolean showHidden)
List items on the remote FTP server with the ability to abort the listing. |
RemoteFileList |
listAll()
List the current remote directory, including hidden files. |
RemoteFileList |
listAll(FTPAbortableTransfer abort)
List the current remote directory including hidden files with the ability to abort the listing. |
void |
login(java.lang.String user,
java.lang.String pass)
Login to the FTP server. |
void |
login(java.lang.String user,
java.lang.String pass,
java.lang.String acct)
Login to the FTP server. |
void |
logout()
Logout from the FTP server. |
protected java.net.Socket |
makeControlSocket(HostInfo hostInfo)
Make a new control socket. |
protected java.net.ServerSocket |
makeDataServerSocket(HostInfo hostInfo)
Make a new data server socket. |
protected java.net.Socket |
makeDataSocket(HostInfo hostInfo)
Make a new data socket. |
protected FTPCommand |
makeFTPCommand(java.io.BufferedReader inputReader,
java.io.PrintWriter outputWriter)
Set the FTPCommand object. |
void |
mkdir(java.lang.String newDir)
Make a new directory on the FTP server. |
void |
modeZ()
Set mode z (on-the-fly compression) data transfer. |
void |
noop()
Send a noop command to the FTP server. |
protected HostInfo |
pasv()
Setup a pasv data connection. |
protected void |
port(HostInfo hostInfo)
Setup an active data connection. |
java.lang.String |
pwd()
Get the current directory on the FTP server. |
void |
raw(java.lang.String rawCmd)
Send a raw command to the FTP server. |
void |
rename(java.lang.String from,
java.lang.String to)
Rename a file on the FTP server. |
void |
retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer)
Retrieve a file from the FTP server. |
void |
retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with the ability to abort the transfer. |
void |
retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress)
Retrieve a file from the FTP server with progress information. |
void |
retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with progress information and the ability to abort the transfer. |
void |
retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream)
Retrieve a file from the FTP server. |
void |
retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with the ability to abort the transfer. |
void |
retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream,
Progress progress)
Retrieve a file from the FTP server with progress information. |
void |
retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream,
Progress progress,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with progress information and the ability to abort the transfer. |
void |
retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer)
Retrieve a file from the FTP server. |
void |
retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with the ability to abort the transfer. |
void |
retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress)
Retrieve a file from the FTP server with progress information. |
void |
retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with progress information and the ability to abort the transfer. |
void |
retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream)
Retrieve a file from the FTP server. |
void |
retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with the ability to abort the transfer. |
void |
retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream,
Progress progress)
Retrieve a file from the FTP server with progress information. |
void |
retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream,
Progress progress,
FTPAbortableTransfer abort)
Retrieve a file from the FTP server with progress information and the ability to abort the transfer. |
void |
rmdir(RemoteFile dir)
Remote a directory from the FTP server. |
void |
rmdir(java.lang.String dir)
Remote a directory from the FTP server. |
void |
sendAccount(java.lang.String acct)
Sends the account to the FTP server. |
void |
sendPassword(java.lang.String pass)
Sends the password to the FTP server. |
void |
sendUserName(java.lang.String user)
Sends the username to the FTP server. |
void |
setAccount(java.lang.String account)
Set the account name. |
void |
setActivePortRange(int minPort,
int maxPort)
Set a range of ports to use during active (port) data connections. |
void |
setConnectionType(short type)
Set the data connection type. |
protected void |
setControlSocket(java.net.Socket controlSocket)
Set the control socket. |
void |
setHostName(java.lang.String hostName)
Set the hostname of the FTP server. |
void |
setListStyle(short listStyle)
Set the server type to help with the listing style of the FTP server. |
void |
setPassword(java.lang.String password)
Set the password. |
void |
setPort(int port)
Set the port of the FTP server. |
void |
setRecvCmdStream(java.io.OutputStream recvCmdStream)
Set the stream responsible for handling respones from the FTP server. |
void |
setSendCmdStream(java.io.OutputStream sendCmdStream)
Set the stream responsible for handling commands sent to the FTP server. |
void |
setSocksIVProxy(java.lang.String host,
int port)
Set the Socks IV server proxy. |
void |
setSocksVProxy(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password)
Set the Socks V server proxy. |
void |
setStringDataAsUTF8(boolean on)
Set server to treat string data in UTF8 format |
void |
setUser(java.lang.String user)
Set the username. |
long |
size(RemoteFile file)
Get the size of a file on the FTP server. |
long |
size(java.lang.String file)
Get the size of a file on the FTP server. |
void |
store(java.io.File file,
boolean restartXfer)
Store a file to the FTP server. |
void |
store(java.io.File file,
boolean restartXfer,
FTPAbortableTransfer abort)
Store a file to the FTP server with the ability to abort the data transfer. |
void |
store(java.io.File file,
boolean restartXfer,
Progress progress)
Store a file to the FTP server with progress information. |
void |
store(java.io.File file,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
Store a file to the FTP server with progress information and the ability to abort the data transfer. |
void |
store(java.io.File file,
java.lang.String name,
boolean restartXfer)
Store a file to the FTP server with a specific filename. |
void |
store(java.io.File file,
java.lang.String name,
boolean restartXfer,
FTPAbortableTransfer abort)
Store a file to the FTP server with a specific filename and with the ability to abort the data transfer. |
void |
store(java.io.File file,
java.lang.String name,
boolean restartXfer,
Progress progress)
Store a file to the FTP server with a specific filename and with progress information. |
void |
store(java.io.File file,
java.lang.String name,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
Store a file to the FTP server with a specific filename and progress information and the ability to abort the data transfer. |
void |
store(java.io.InputStream inputStream)
Store a file to the FTP server. |
void |
store(java.io.InputStream inputStream,
FTPAbortableTransfer abort)
Store a file to the FTP server with the ability to abort the data transfer. |
void |
store(java.io.InputStream inputStream,
long localFileSize,
Progress progress)
Store a file to the FTP server with progress information. |
void |
store(java.io.InputStream inputStream,
long localFileSize,
Progress progress,
FTPAbortableTransfer abort)
Store a file to the FTP server with progress information and the ability to abort the data transfer. |
void |
store(java.io.InputStream inputStream,
long localFileSize,
java.lang.String name,
Progress progress)
Store a file to the FTP server with a specific filename and with progress information. |
void |
store(java.io.InputStream inputStream,
long localFileSize,
java.lang.String name,
Progress progress,
FTPAbortableTransfer abort)
Store a file to the FTP server with a specific filename and progress information and the ability to abort the data transfer. |
void |
store(java.io.InputStream inputStream,
java.lang.String name)
Store a file to the FTP server with a specific filename. |
void |
store(java.io.InputStream inputStream,
java.lang.String name,
FTPAbortableTransfer abort)
Store a file to the FTP server with a specific filename and with the ability to abort the data transfer. |
boolean |
stringDataAsUTF8()
Whether or not the server is treating the string data as UTF8 |
java.util.Date |
time(RemoteFile file)
Get the modification time of a file on the FTP server. |
java.util.Date |
time(java.lang.String file)
Get the modification time of a file on the FTP server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final short ASCII_TRANSFER_MODE
ascii.
public static final short BINARY_TRANSFER_MODE
binary; also
known as image.
public static final short AUTO_TRANSFER_MODE
auto. This mode
attempts to guess which transfer mode (ascii or binary) to set
based on file type.
public static final short EBCDIC_TRANSFER_MODE
ebcdic.
public static final short PASV_CONNECTION_TYPE
passive.
public static final short PASSIVE_CONNECTION_TYPE
passive.
public static final short ACTIVE_CONNECTION_TYPE
active.
protected boolean modeZEnabled
protected boolean isConnected
protected boolean isLoggedIn
protected int lastPortFromRange
protected int minPortInRange
protected int maxPortInRange
protected java.io.OutputStream recvCmdStream
protected java.io.OutputStream sendCmdStream
protected FTPCommand command
| Constructor Detail |
|---|
public FTP(HostInfo hostInfo)
FTP object without response notification.
hostInfo - the HostInfo to connect to.
public FTP(java.lang.String host,
int port)
FTP object without response notification.
host - the hostname to connect to.port - the port to connect to.
public FTP(HostInfo hostInfo,
java.io.OutputStream sendCmdStream,
java.io.OutputStream recvCmdStream)
FTP object with response notification.
hostInfo - the HostInfo to connect to.sendCmdStream - the commands sent to the server.
Pass null if not interested
in this data.recvCmdStream - the responses returned from the server.
Pass null if not interested
in this data.
public FTP(java.lang.String host,
int port,
java.io.OutputStream sendCmdStream,
java.io.OutputStream recvCmdStream)
FTP object with response notification.
host - the hostname to connect to.port - the port to connect to.sendCmdStream - the commands sent to the server.
Pass null if not interested
in this data.recvCmdStream - the responses returned from the server.
Pass null if not interested
in this data.| Method Detail |
|---|
public void connect()
throws FTPConnectException,
FTPException,
java.io.IOException,
java.net.UnknownHostException,
java.lang.IllegalArgumentException
FTPConnectException - if the connection fails.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there are socket problems.
java.net.UnknownHostException - if the host could not be found.
java.lang.IllegalArgumentException - if hostName is
null.
public void login(java.lang.String user,
java.lang.String pass)
throws java.io.IOException,
FTPBadLoginException,
FTPConnectException,
FTPException,
java.lang.IllegalArgumentException
user - the username to login as.pass - the password to login as.
java.io.IOException - if there is a socket problem.
FTPBadLoginException - if there is a problem logging in.
FTPConnectException - if this is called prior to
connect
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with any of the
passed in args.connect()
public void login(java.lang.String user,
java.lang.String pass,
java.lang.String acct)
throws java.io.IOException,
FTPBadLoginException,
FTPConnectException,
FTPException,
java.lang.IllegalArgumentException
user - the username to login as.pass - the password to login as.acct - the account to use.
java.io.IOException - if there is a socket problem.
FTPBadLoginException - if there is a problem logging in.
FTPConnectException - if this is called prior to
connect
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with any of the
passed in args.connect()
public void logout()
throws java.io.IOException,
FTPException
java.io.IOException - if there is a socket problem.
FTPException - if the FTP server returns an error code.
public void sendUserName(java.lang.String user)
throws FTPNeedPasswordException,
FTPNeedAccountException,
FTPBadLoginException,
FTPException,
java.lang.IllegalArgumentException
user - the username.
FTPNeedPasswordException - if a password is required.
FTPNeedAccountException - if an accound is required.
FTPBadLoginException - if there is a problem logging in.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the username.
public void sendPassword(java.lang.String pass)
throws FTPNeedAccountException,
FTPBadLoginException,
FTPException,
java.lang.IllegalArgumentException
pass - the password.
FTPNeedAccountException - if an accound is required.
FTPBadLoginException - if there is a problem logging in.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the password.
public void sendAccount(java.lang.String acct)
throws FTPBadLoginException,
FTPException,
java.lang.IllegalArgumentException
acct - the account.
FTPBadLoginException - if there is a problem logging in.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the account.
public RemoteFileList listAll()
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList list()
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList list(FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
abort - an Object that allows for the abortion of the
list.
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList listAll(FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
abort - an Object that allows for the abortion of the
list.
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList list(RemoteFile file)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - a RemoteFile you
want to to list from the FTP server.
Pass null to list the current directory.
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList list(java.lang.String itemsToList)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
itemsToList - a space-delimited String of items you
want to to list from the FTP server.
Pass null to list the current directory.
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList list(RemoteFile file,
FTPAbortableTransfer abort,
boolean showHidden)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - a RemoteFile want to to list from the
FTP server.abort - an Object that allows for the abortion of the
list.showHidden - flag to show hidden files (only useful for empty list)
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public RemoteFileList list(java.lang.String itemsToList,
FTPAbortableTransfer abort,
boolean showHidden)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
itemsToList - a space-delimited String of items you
want to to list from the FTP server.
Pass null to list the current directory.abort - an Object that allows for the abortion of the
list.showHidden - flag to show hidden files (only useful for empty list)
RemoteFile objects as a
RemoteFileList.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket problem.RemoteFile,
getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
download status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
download status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.progress - a Progress object which is used to
update download status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.progress - a Progress object which is used to
update download status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
download status.abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.File outputFile,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputFile - a local file that will act as storage for the
downloaded file. If this parameter is
null, a local file will be created with
the remote file's name in the current local
directory as specified by user.dir.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
download status.abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(java.lang.String remoteFile,
java.io.OutputStream outputStream,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the name of the remote file that
exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.progress - a Progress object which is used to
update download status.abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void retrieve(RemoteFile remoteFile,
java.io.OutputStream outputStream,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
remoteFile - the RemoteFile that exists on the FTP server.outputStream - an output stream that will act as storage for the
downloaded file.progress - a Progress object which is used to
update download status.abort - an Object that allows for the abortion of the
retrieve.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
boolean restartXfer)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.restartXfer - restart an interrupted transfer (if available).
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
java.lang.String name,
boolean restartXfer)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.name - the name you want to save the file as.restartXfer - restart an interrupted transfer (if available).
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
java.lang.String name)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.name - the name you want to save the file as.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
boolean restartXfer,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.restartXfer - restart an interrupted transfer (if available).abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
java.lang.String name,
boolean restartXfer,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.name - the name you want to save the file as.restartXfer - restart an interrupted transfer (if available).abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
java.lang.String name,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.name - the name you want to save the file as.abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
boolean restartXfer,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
upload status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
java.lang.String name,
boolean restartXfer,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.name - the name you want to save the file as.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
upload status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
long localFileSize,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.localFileSize - the size of the "local file".progress - a Progress object which is used to
update upload status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
long localFileSize,
java.lang.String name,
Progress progress)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.localFileSize - the size of the "local file".name - the name you want to save the file as.progress - a Progress object which is used to
update upload status.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
upload status.abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.File file,
java.lang.String name,
boolean restartXfer,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.name - the name you want to save the file as.restartXfer - restart an interrupted transfer (if available).progress - a Progress object which is used to update
upload status.abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
long localFileSize,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.localFileSize - the size of the "local file".progress - a Progress object which is used to
update upload status.abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void store(java.io.InputStream inputStream,
long localFileSize,
java.lang.String name,
Progress progress,
FTPAbortableTransfer abort)
throws FTPRestartNotSupportedException,
FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" input stream you want to upload.localFileSize - the size of the "local file".name - the name you want to save the file as.progress - a Progress object which is used to
update upload status.abort - an Object that allows for the abortion of the
store.
FTPRestartNotSupportedException - if the FTP server doesn't support
restarting incomplete file xfer.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
java.lang.String appendTo)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the remote file name you want to append to.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
RemoteFile appendTo)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the RemoteFile you want to append to.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
java.lang.String appendTo)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.appendTo - the remote file name you want to append to.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
RemoteFile appendTo)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.appendTo - the RemoteFile you want to append to.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
java.lang.String appendTo,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the remote file name you want to append to.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
RemoteFile appendTo,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the RemoteFile you want to append to.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
java.lang.String appendTo,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.appendTo - the remote file name you want to append to.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
RemoteFile appendTo,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.appendTo - the RemoteFile you want to append to.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
java.lang.String appendTo,
Progress progress)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the remote file name you want to append to.progress - a Progress object which is used to update
upload status.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
RemoteFile appendTo,
Progress progress)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the RemoteFile you want to append to.progress - a Progress object which is used to update
upload status.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
long localFileSize,
java.lang.String appendTo,
Progress progress)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.localFileSize - the size of the "local file"appendTo - the remote file name you want to append to.progress - a Progress object which is used to
update upload status.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
long localFileSize,
RemoteFile appendTo,
Progress progress)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.localFileSize - the size of the "local file"appendTo - the RemoteFile you want to append to.progress - a Progress object which is used to
update upload status.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
java.lang.String appendTo,
Progress progress,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the remote file name you want to append to.progress - a Progress object which is used to update
upload status.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.File file,
RemoteFile appendTo,
Progress progress,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
file - the local file you want to upload.appendTo - the RemoteFile you want to append to.progress - a Progress object which is used to update
upload status.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
long localFileSize,
java.lang.String appendTo,
Progress progress,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.localFileSize - the size of the "local file"appendTo - the remote file name you want to append to.progress - a Progress object which is used to
update upload status.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void append(java.io.InputStream inputStream,
long localFileSize,
RemoteFile appendTo,
Progress progress,
FTPAbortableTransfer abort)
throws FTPException,
java.io.IOException,
java.lang.IllegalArgumentException
Based on what getConnectionType returns, either
pasv or port will be sent in this routine.
inputStream - the "local file" stream you want to upload.localFileSize - the size of the "local file"appendTo - the RemoteFile you want to append to.progress - a Progress object which is used to
update upload status.abort - an Object that allows for the abortion of the
append.
FTPException - if the FTP server returns an error code.
java.io.IOException - if there is a socket or file problem.
java.lang.IllegalArgumentException - if there are argument related problems.getConnectionType(),
setConnectionType(short),
pasv(),
port(HostInfo)
public void raw(java.lang.String rawCmd)
throws FTPException
rawCmd - the command sent to the FTP server.
FTPException - if the FTP server returns an error code.
public void noop()
throws FTPException
FTPException - if the FTP server returns an error code.
public void abort(FTPAbortableTransfer abort)
throws FTPException,
java.lang.IllegalArgumentException
abort - an Object that will has information that
will allow for the abortion of a transfer.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
abort argument.
public void setStringDataAsUTF8(boolean on)
throws FTPException
on - enable UTF8 support.
FTPException - if the FTP server returns an error code.public boolean stringDataAsUTF8()
protected HostInfo pasv()
throws FTPException
HostInfo object that is used for the data transfer.
- Throws:
FTPException - if the FTP server returns an error code.
protected void port(HostInfo hostInfo)
throws FTPException
hostInfo - a HostInfo object that describes the
host information used for the data transfer.
FTPException - if the FTP server returns an error code.
public void chdir(java.lang.String dir)
throws FTPNotADirectoryException,
FTPNoSuchFileException,
FTPException,
java.lang.IllegalArgumentException
dir - the name of the remote directory to change to.
FTPNotADirectoryException - if the dir arg is not
a directory.
FTPNoSuchFileException - if the dir arg could not
be found on the server.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
dir argument.
public void chdir(RemoteFile dir)
throws FTPNotADirectoryException,
FTPNoSuchFileException,
FTPException,
java.lang.IllegalArgumentException
dir - the remote directory to change to.
FTPNotADirectoryException - if the dir arg is not
a directory.
FTPNoSuchFileException - if the dir arg could not
be found on the server.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
dir argument.
public java.lang.String help(java.lang.String item)
throws FTPException
item - a space-delimited String of items to get
help on.
FTPException - if the FTP server returns an error code.
public java.lang.String pwd()
throws FTPException
FTPException - if the FTP server returns an error code.
public void ascii()
throws FTPException
FTPException - if the FTP server returns an error code.
public void ebcdic()
throws FTPException
FTPException - if the FTP server returns an error code.public void auto()
public void binary()
throws FTPException
FTPException - if the FTP server returns an error code.
public void modeZ()
throws FTPException
FTPException - if the FTP server returns an error code.
public void delete(java.lang.String fileName)
throws FTPException,
java.lang.IllegalArgumentException
fileName - the file to delete on the server.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
fileName argument.
public void delete(RemoteFile fileName)
throws FTPException,
java.lang.IllegalArgumentException
fileName - the file to delete on the server.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
fileName argument.
public void rename(java.lang.String from,
java.lang.String to)
throws FTPException,
java.lang.IllegalArgumentException
from - the old name of the file.to - the new name of the file.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
from or to
arguments.
public long size(java.lang.String file)
throws FTPNoSuchFileException,
FTPException,
java.lang.IllegalArgumentException
file - the name of the file.
-1 if the size could not be
determined.
FTPNoSuchFileException - if file is not found.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if file is missing.
public long size(RemoteFile file)
throws FTPNoSuchFileException,
FTPException,
java.lang.IllegalArgumentException
file - the name of the file.
-1 if the size could not be
determined.
FTPNoSuchFileException - if file is not found.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if file is missing.
public java.util.Date time(java.lang.String file)
throws FTPNoSuchFileException,
FTPException,
java.lang.IllegalArgumentException
file - the name of the file.
null if the time could not be
determined.
FTPNoSuchFileException - if file is not found.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if file is missing.
public java.util.Date time(RemoteFile file)
throws FTPNoSuchFileException,
FTPException,
java.lang.IllegalArgumentException
file - the name of the file.
null if the time could not be
determined.
FTPNoSuchFileException - if file is not found.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if file is missing.
public void mkdir(java.lang.String newDir)
throws FTPException,
FTPAccessDeniedException,
java.lang.IllegalArgumentException
newDir - the name of the new directory.
FTPAccessDeniedException - if the directory couldn't be created
due to access restrictions.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
newDir argument.
public void rmdir(java.lang.String dir)
throws FTPException,
java.lang.IllegalArgumentException
dir - the directory to delete on the server.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
dir argument.
public void rmdir(RemoteFile dir)
throws FTPException,
java.lang.IllegalArgumentException
dir - the directory to delete on the server.
FTPException - if the FTP server returns an error code.
java.lang.IllegalArgumentException - if there is a problem with the
dir argument.
public void cdup()
throws FTPException
FTPException - if the FTP server returns an error code.
protected java.net.Socket makeControlSocket(HostInfo hostInfo)
throws java.io.IOException
hostInfo - a HostInfo object that
describes where to make the socket.
java.io.IOException - if there is a socket problem.
protected java.net.Socket makeDataSocket(HostInfo hostInfo)
throws java.io.IOException
hostInfo - a HostInfo object that
describes where to make the socket.
java.io.IOException - if there is a socket problem.
protected java.net.ServerSocket makeDataServerSocket(HostInfo hostInfo)
throws java.io.IOException
hostInfo - a HostInfo object that
describes where to make the socket.
java.io.IOException - if there is a socket problem.
public void setActivePortRange(int minPort,
int maxPort)
throws java.lang.Exception
minPort - the minPort specifies
the minimum port used for active transfersmaxPort - the maxPort specifies
the maximum port used for active transfers
java.lang.Exception - if the min/max ports are invalidprotected int getPortFromRange()
public short getTransferMode()
AUTO_TRANSFER_MODE,
ASCII_TRANSFER_MODE,
BINARY_TRANSFER_MODE,
EBCDIC_TRANSFER_MODEpublic int getConnectionType()
PASV_CONNECTION_TYPE,
ACTIVE_CONNECTION_TYPEpublic void setConnectionType(short type)
type - the connection type.PASV_CONNECTION_TYPE,
ACTIVE_CONNECTION_TYPEpublic boolean isConnected()
public boolean isLoggedIn()
public boolean isTransferRestartable()
public java.lang.String getHostName()
public void setHostName(java.lang.String hostName)
hostName - the hostname of the FTP server.public int getPort()
public void setPort(int port)
port - the port of the FTP server.public java.lang.String getUser()
public void setUser(java.lang.String user)
user - the username.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - the password.public java.lang.String getAccount()
public void setAccount(java.lang.String account)
account - the account name.public java.net.Socket getControlSocket()
protected void setControlSocket(java.net.Socket controlSocket)
throws java.io.IOException
controlSocket - the control socket.
java.io.IOExceptionpublic void setRecvCmdStream(java.io.OutputStream recvCmdStream)
recvCmdStream - the server response stream.
Pass null to unset this stream.public void setSendCmdStream(java.io.OutputStream sendCmdStream)
sendCmdStream - the commands sent stream.
Pass null to unset this stream.public short getListStyle()
FTPServerInfo.LIST_STYLE_UNKNOWN,
FTPServerInfo.LIST_STYLE_UNIX,
FTPServerInfo.LIST_STYLE_WINDOWS,
FTPServerInfo.LIST_STYLE_NETWAREpublic void setListStyle(short listStyle)
listStyle - the list style for the server type
(UNIX, NETWARE, Windows, Unknown)FTPServerInfo.LIST_STYLE_UNKNOWN,
FTPServerInfo.LIST_STYLE_UNIX,
FTPServerInfo.LIST_STYLE_WINDOWS,
FTPServerInfo.LIST_STYLE_NETWARE
public void setSocksIVProxy(java.lang.String host,
int port)
host - the hostname of the proxy.
Pass null to unset the proxy.port - the port of the proxy.
public void setSocksVProxy(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password)
host - the hostname of the proxy.
Pass null to unset the proxy.port - the port of the proxy.username - the socks username (can be null for no auth)password - the socks password (can be null for no auth)public FTPCommand getFTPCommand()
FTPCommand object.
FTPCommand object.
protected FTPCommand makeFTPCommand(java.io.BufferedReader inputReader,
java.io.PrintWriter outputWriter)
FTPCommand object.
inputReader - the BufferedReader comes from
the input stream of the control socket.outputWriter - the PrintWriter comes from
the output stream of the control socket.
FTPCommand object.public static java.lang.String getVersion()
public static java.lang.String getDateStamp()
public void forcePasvToUseControlIP(boolean on)
on - true if to use control socket IP, false if off.protected void aboutToTransferData()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||