|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.ftps.FtpsClient
public class FtpsClient
The FTP client. Provides protocol-level services hiding the exact FTP request/response exchange implementation.
Field Summary | |
---|---|
static char |
DATA_CLEAR
|
static char |
DATA_CONFIDENTIAL
|
static char |
DATA_PRIVATE
|
static char |
DATA_SAFE
|
static int |
DEFAULT_DATA_PORT
The FTP data default port |
static int |
DEFAULT_PORT
The FTP default port |
static java.lang.String |
EOL
The FTP end-of-line symbols |
Method Summary | |
---|---|
void |
abort()
The FTP ABOR command. |
void |
account(java.lang.String account)
The FTP ACCT command. |
void |
allocate(int size)
The FTP ALLO command. |
void |
allocate(int size,
int optionsSize)
The FTP ALLO command. |
java.net.Socket |
append(java.lang.String fileName)
The FTP APPE command. |
void |
authorize(java.lang.String method)
The FTP AUTH TLS command. |
void |
bufferSize()
The FTP PBSZ 0 command. |
void |
changeToParentDirectory()
The FTP CDUPcommand. |
void |
changeWorkingDirectory(java.lang.String directory)
The FTP CWD command. |
void |
clear()
The FTP CCC command. |
void |
close()
Closes the current client. |
static FtpsClient |
createProtected(Ftps source,
ConnectionParameters parameters,
javax.net.ssl.SSLContext context,
java.lang.String[] enabledCiphers,
Logger logger)
|
static FtpsClient |
createUnprotected(Ftps source,
ConnectionParameters parameters,
javax.net.ssl.SSLContext context,
java.lang.String[] enabledCiphers,
Logger logger)
|
void |
dataPort(int dataPortStart,
int dataPortEnd)
The FTP PORT command. |
void |
delete(java.lang.String fileName)
The FTP DELE command. |
void |
fileStructure(char fileStructure)
The FTP STRU command. |
boolean |
getAutoDetectIpv6()
Get auto detect Ipv6 detection mode. |
boolean |
getConnectBeforeCommand()
Gets the connectBefore indicator |
FtpsCertificateVerifier |
getFtpsCertificateVerifier()
|
Response |
getLastResponse()
Obtains the last server response. |
java.lang.String |
getNATAddress()
Get NAT address. |
java.lang.String |
getPortAddress()
Gets the external address to use when using active connections using the PORT command. |
boolean |
getUseEPRT()
Gets use EPRT value. |
boolean |
getUseEPSV()
Gets use EPSV value. |
java.lang.String |
help(java.lang.String option)
The FTP HELP command. |
boolean |
isClosed()
Checks if the current client is closed. |
boolean |
isShutdownCCC()
Gets whether SSL connection should be shutdown after successfully issuing CCC command. |
java.net.Socket |
list(java.lang.String path)
The FTP LIST command. |
void |
makeDirectory(java.lang.String directoryName)
The FTP MKD command. |
java.net.Socket |
mlsd(java.lang.String dirname)
|
java.net.Socket |
nameList(java.lang.String path)
The FTP NLST command. |
Response |
noop()
The FTP NOOP command. |
void |
passive(boolean firewall)
The FTP PASV command. |
Response |
password(java.lang.String password)
The FTP PASS command. |
java.lang.String |
printWorkingDirectory()
The FTP PWD command. |
void |
protectionLevel(char level)
The FTP PROT command. |
void |
quit()
The FTP QUIT command. |
Response |
readResponse()
Reads the server response skipping all preliminary responses. |
void |
reinitialize()
The FTP REIN command. |
void |
removeDirectory(java.lang.String directoryName)
The FTP RMD command. |
void |
rename(java.lang.String oldName,
java.lang.String newName)
The FTP RNFR and RNTO commands. |
void |
representationType(java.lang.String type)
The FTP TYPE command. |
void |
restart(java.lang.String serverMarker)
The FTP REST command. |
java.net.Socket |
retrieve(java.lang.String fileName)
The FTP RETR command. |
void |
sendCommand(java.lang.String command)
Sends command to the server. |
Response |
sendRequest(java.lang.String command)
Sends the request to the server. |
void |
setAutoDetectIpv6(boolean value)
Set auto detect Ipv6 detection mode. |
void |
setConnectBeforeCommand(boolean connect)
Sets the connectBefore property value |
void |
setFtpsCertificateVerifier(FtpsCertificateVerifier certificateVerifier)
|
void |
setNATAddress(java.lang.String ipAddress)
Sets a NAT address which will be used after PASV command. |
void |
setPortAddress(java.lang.String string)
Sets the external address to use when using active connections using the PORT command. |
void |
setReceiveBufferSize(int receiveBufferSize)
Sets the receive buffer size option of the ftps connection. |
void |
setSendBufferSize(int sendBufferSize)
Sets the send buffer size option of the ftps connection. |
void |
setShutdownCCC(boolean shutdownCCC)
Sets whether SSL connection should be shutdown after successfully issuing CCC command. |
void |
setUseEPRT(boolean useEPRT)
Sets use EPRT indicator. |
void |
setUseEPSV(boolean useEPSV)
Sets use EPSV indicator. |
java.lang.String |
siteParameters()
The FTP SITE command. |
java.lang.String |
status(java.lang.String path)
The FTP STAT command. |
java.net.Socket |
store(java.lang.String fileName)
The FTP STOR command. |
java.net.Socket |
storeUnique(java.lang.String fileName)
The FTP STOU command. |
void |
structureMount(java.lang.String structure)
The FTP SMNT command. |
java.lang.String |
system()
The FTP SYST command. |
void |
transferMode(java.lang.String mode)
The FTP TYPE command. |
Response |
userName(java.lang.String name)
The FTP USER command. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORT
public static final int DEFAULT_DATA_PORT
public static final char DATA_CLEAR
public static final char DATA_SAFE
public static final char DATA_CONFIDENTIAL
public static final char DATA_PRIVATE
public static final java.lang.String EOL
Method Detail |
---|
public static FtpsClient createUnprotected(Ftps source, ConnectionParameters parameters, javax.net.ssl.SSLContext context, java.lang.String[] enabledCiphers, Logger logger) throws FtpException
parameters
- context
- logger
-
FtpException
public static FtpsClient createProtected(Ftps source, ConnectionParameters parameters, javax.net.ssl.SSLContext context, java.lang.String[] enabledCiphers, Logger logger) throws FtpException
parameters
- context
- logger
-
FtpException
public void close()
public void setAutoDetectIpv6(boolean value)
value
- public boolean getAutoDetectIpv6()
public boolean isClosed()
true
if the client is closed;
false
otherwisepublic java.lang.String getPortAddress()
public void setPortAddress(java.lang.String string)
string
- an ip addresspublic void setConnectBeforeCommand(boolean connect)
connect
- It indicates if the connection will be established before
send the commandpublic void setNATAddress(java.lang.String ipAddress) throws FtpException
ipAddress
- The NAT IP address.
FtpException
- If an error occurs.public java.lang.String getNATAddress()
public boolean getConnectBeforeCommand()
true
the connection will be establiched before send the commandpublic Response sendRequest(java.lang.String command) throws FtpException
command
- a FTP command
FtpException
- if an I/O or protocol error occurspublic Response getLastResponse()
public void sendCommand(java.lang.String command) throws FtpException
command
- a FTP command
FtpException
- if an I/O or protocol error occurspublic Response readResponse() throws FtpException
FtpException
- if an I/O or protocol error occurspublic boolean isShutdownCCC()
true
to shutdown, false
otherwisepublic void setShutdownCCC(boolean shutdownCCC)
shutdownCCC
- true
to shutdown, false
otherwisepublic void setUseEPSV(boolean useEPSV)
useEPSV
- The use EPSV valuepublic boolean getUseEPSV()
true
the pasive mode will be sent EPSV commandpublic void setUseEPRT(boolean useEPRT)
useEPRT
- The use EPRT valuepublic boolean getUseEPRT()
true
the active mode will be sent EPRT commandpublic Response userName(java.lang.String name) throws FtpException
name
- user name
FtpException
- if an I/O or protocol error occurspublic Response password(java.lang.String password) throws FtpException
password
- the password
FtpException
- if an I/O or protocol error occurspublic void account(java.lang.String account) throws FtpException
account
- the user account
FtpException
- if an I/O or protocol error occurspublic void changeWorkingDirectory(java.lang.String directory) throws FtpException
directory
- the target directory.
FtpException
- if an I/O or protocol error occurspublic void changeToParentDirectory() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void structureMount(java.lang.String structure) throws FtpException
structure
- the structure
FtpException
- if an I/O or protocol error occurspublic void reinitialize() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void quit() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void dataPort(int dataPortStart, int dataPortEnd) throws FtpException
dataPortStart
- The start data port range.dataPortEnd
- The end data port range.
FtpException
- if an I/O or protocol error occurspublic void passive(boolean firewall) throws FtpException
FtpException
- if an I/O or protocol error occurspublic void transferMode(java.lang.String mode) throws FtpException
mode
- the transfer mode
FtpException
- if an I/O or protocol error occurspublic void representationType(java.lang.String type) throws FtpException
type
- the representation type
FtpException
- if an I/O or protocol error occurspublic void fileStructure(char fileStructure) throws FtpException
fileStructure
- the file structure
FtpException
- if an I/O or protocol error occurspublic void allocate(int size) throws FtpException
size
- the size
FtpException
- if an I/O or protocol error occurspublic void allocate(int size, int optionsSize) throws FtpException
size
- the sizeoptionsSize
- the options size
FtpException
- if an I/O or protocol error occurspublic void restart(java.lang.String serverMarker) throws FtpException
serverMarker
- the server marker string
FtpException
- if an I/O or protocol error occurspublic java.net.Socket retrieve(java.lang.String fileName) throws FtpException
fileName
- the target file path
FtpException
- if an I/O or protocol error occurspublic java.net.Socket store(java.lang.String fileName) throws FtpException
fileName
- the target file path
FtpException
- if an I/O or protocol error occurspublic java.net.Socket storeUnique(java.lang.String fileName) throws FtpException
FtpException
- if an I/O or protocol error occurspublic java.net.Socket append(java.lang.String fileName) throws FtpException
fileName
- the target file path
FtpException
- if an I/O or protocol error occurspublic void rename(java.lang.String oldName, java.lang.String newName) throws FtpException
oldName
- the old file namenewName
- the new file name
FtpException
- if an I/O or protocol error occurspublic void abort() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void delete(java.lang.String fileName) throws FtpException
fileName
- the target file name
FtpException
- if an I/O or protocol error occurspublic void removeDirectory(java.lang.String directoryName) throws FtpException
directoryName
- the target directory name
FtpException
- if an I/O or protocol error occurspublic void makeDirectory(java.lang.String directoryName) throws FtpException
directoryName
- the target directory name
FtpException
- if an I/O or protocol error occurspublic java.lang.String printWorkingDirectory() throws FtpException
FtpException
- if an I/O or protocol error occurspublic java.net.Socket list(java.lang.String path) throws FtpException
path
- the directory path
FtpException
- if an I/O or protocol error occurspublic java.net.Socket nameList(java.lang.String path) throws FtpException
path
- the directory path
FtpException
- if an I/O or protocol error occurspublic java.lang.String siteParameters() throws FtpException
FtpException
- if an I/O or protocol error occurspublic java.lang.String system() throws FtpException
FtpException
- if an I/O or protocol error occurspublic java.lang.String status(java.lang.String path) throws FtpException
path
- the file path
FtpException
- if an I/O or protocol error occurspublic java.lang.String help(java.lang.String option) throws FtpException
option
- the command option
FtpException
- if an I/O or protocol error occurspublic Response noop() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void authorize(java.lang.String method) throws FtpException
FtpException
- if an I/O or protocol error occurspublic void clear() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void bufferSize() throws FtpException
FtpException
- if an I/O or protocol error occurspublic void protectionLevel(char level) throws FtpException
level
- the protection level
FtpException
- if an I/O or protocol error occurspublic void setSendBufferSize(int sendBufferSize)
sendBufferSize
- Send buffer size.public void setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize
- Receive buffer size.public java.net.Socket mlsd(java.lang.String dirname) throws FtpException
FtpException
public FtpsCertificateVerifier getFtpsCertificateVerifier()
public void setFtpsCertificateVerifier(FtpsCertificateVerifier certificateVerifier)
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |