📄 connectioncontext.java
字号:
*
* @param strict true for strict checking, false for loose checking
*/
public synchronized void setStrictReturnCodes(boolean strict) {
this.strictReturnCodes = strict;
}
/**
* Determine if strict checking of return codes is switched on. If it is
* (the default), all return codes must exactly match the expected code.
* If strict checking is off, only the first digit must match.
*
* @return true if strict return code checking, false if non-strict.
*/
public synchronized boolean isStrictReturnCodes() {
return strictReturnCodes;
}
/**
* Is automatic substitution of the remote host IP set to
* be on for passive mode connections?
*
* @return true if set on, false otherwise
*/
public synchronized boolean isAutoPassiveIPSubstitution() {
return autoPassiveIPSubstitution;
}
/**
* Set automatic substitution of the remote host IP on if
* in passive mode
*
* @param autoPassiveIPSubstitution true if set to on, false otherwise
*/
public synchronized void setAutoPassiveIPSubstitution(boolean autoPassiveIPSubstitution) {
this.autoPassiveIPSubstitution = autoPassiveIPSubstitution;
}
/**
* Listen on all interfaces for active mode transfers (the default).
*
* @param listenOnAll true if listen on all interfaces, false to listen on the control interface
*/
public synchronized void setListenOnAllInterfaces(boolean listenOnAll) {
listenOnAllInterfaces = listenOnAll;
}
/**
* Are we listening on all interfaces in active mode, which is the default?
*
* @return true if listening on all interfaces, false if listening just on the control interface
*/
public synchronized boolean isListenOnAllInterfaces() {
return listenOnAllInterfaces;
}
/**
* If true, delete partially written files when exceptions are thrown
* during a download
*
* @return true if delete local file on error
*/
public synchronized boolean isDeleteOnFailure() {
return deleteOnFailure;
}
/**
* Switch on or off the automatic deletion of partially written files
* that are left when an exception is thrown during a download
*
* @param deleteOnFailure true if delete when a failure occurs
*/
public synchronized void setDeleteOnFailure(boolean deleteOnFailure) {
this.deleteOnFailure = deleteOnFailure;
}
public synchronized FTPConnectMode getConnectMode() {
return connectMode;
}
public synchronized void setConnectMode(FTPConnectMode connectMode) {
this.connectMode = connectMode;
}
public synchronized void setPassword(String password) {
this.password = password;
}
public synchronized void setRemoteHost(String remoteHost) {
this.remoteHost = remoteHost;
}
public synchronized void setRemotePort(int remotePort) {
this.remotePort = remotePort;
}
public synchronized void setUserName(String username) {
this.username = username;
}
public synchronized void setContentType(FTPTransferType transferType) {
this.transferType = transferType;
}
public synchronized FTPTransferType getContentType() {
return transferType;
}
public synchronized String getPassword() {
return password;
}
public synchronized String getRemoteHost() {
return remoteHost;
}
public synchronized int getRemotePort() {
return remotePort;
}
/**
* Set the list of locales to be tried for date parsing of dir listings
*
* @param locales locales to use
*/
public synchronized void setParserLocales(Locale[] locales) {
this.parserLocales = locales;
}
public synchronized int getTimeout() {
return timeout;
}
public synchronized void setTimeout(int timeout) {
this.timeout = timeout;
}
public synchronized String getUserName() {
return username;
}
public synchronized Locale[] getParserLocales() {
return parserLocales;
}
/**
* Get the encoding used for the control connection
*
* @return Returns the current controlEncoding.
*/
public synchronized String getControlEncoding() {
return controlEncoding;
}
/**
* Set the encoding used for control channel messages
*
* @param controlEncoding The controlEncoding to set, which is the name of a Charset
*/
public synchronized void setControlEncoding(String controlEncoding) {
this.controlEncoding = controlEncoding;
}
/**
* Set the size of the buffers used in writing to and reading from
* the data sockets
*
* @param size new size of buffer in bytes
*/
public void setTransferBufferSize(int size) {
transferBufferSize = size;
}
/**
* Get the size of the buffers used in writing to and reading from
* the data sockets
*
* @return transfer buffer size
*/
public int getTransferBufferSize() {
return transferBufferSize;
}
/**
* Get the interval used for progress notification of transfers.
*
* @return number of bytes between each notification.
*/
public synchronized int getTransferNotifyInterval() {
return transferNotifyInterval;
}
/**
* Set the interval used for progress notification of transfers.
*
* @param notifyInterval number of bytes between each notification
*/
public synchronized void setTransferNotifyInterval(int notifyInterval) {
this.transferNotifyInterval = notifyInterval;
}
/**
* Get class that holds fragments of server messages that indicate a file was
* not found. New messages can be added.
* <p>
* The fragments are used when it is necessary to examine the message
* returned by a server to see if it is saying a file was not found.
* If an FTP server is returning a different message that still clearly
* indicates a file was not found, use this property to add a new server
* fragment to the repository via the add method. It would be helpful to
* email support at enterprisedt dot com to inform us of the message so
* it can be added to the next build.
*
* @return messages class
*/
public synchronized FileNotFoundStrings getFileNotFoundMessages() {
return fileNotFoundStrings;
}
/**
* Get class that holds fragments of server messages that indicate a transfer completed.
* New messages can be added.
* <p>
* The fragments are used when it is necessary to examine the message
* returned by a server to see if it is saying a transfer completed.
* If an FTP server is returning a different message that still clearly
* indicates a transfer failed, use this property to add a new server
* fragment to the repository via the add method. It would be helpful to
* email support at enterprisedt dot com to inform us of the message so
* it can be added to the next build.
*
* @return messages class
*/
public synchronized TransferCompleteStrings getTransferCompleteMessages() {
return transferCompleteStrings;
}
/**
* Get class that holds fragments of server messages that indicate a
* directory is empty. New messages can be added.
* <p>
* The fragments are used when it is necessary to examine the message
* returned by a server to see if it is saying a directory is empty.
* If an FTP server is returning a different message that still clearly
* indicates a directory is empty, use this property to add a new server
* fragment to the repository via the add method. It would be helpful to
* email support at enterprisedt dot com to inform us of the message so
* it can be added to the next build.
*
* @return messages class
*/
public synchronized DirectoryEmptyStrings getDirectoryEmptyMessages() {
return dirEmptyStrings;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -