public class FTPSEnvironment extends FTPEnvironment
FileSystemProvider.newFileSystem(URI, Map) and
FileSystemProvider.newFileSystem(Path, Map) methods of FTPSFileSystemProvider.| Constructor and Description |
|---|
FTPSEnvironment()
Creates a new FTPS environment.
|
FTPSEnvironment(Map<String,Object> map)
Creates a new FTPS environment.
|
| Modifier and Type | Method and Description |
|---|---|
FTPSEnvironment |
clone() |
FTPSEnvironment |
withAbsoluteFilePathSupport(boolean supportAbsoluteFilePaths)
Deprecated.
Use
withFTPFileStrategyFactory(FTPFileStrategyFactory) instead. A value of true should be replaced with
FTPFileStrategyFactory.AUTO_DETECT, a value of false with FTPFileStrategyFactory.NON_UNIX. |
FTPSEnvironment |
withActiveExternalIPAddress(String ipAddress)
Stores the external IP address in active mode.
|
FTPSEnvironment |
withActivePortRange(int minPort,
int maxPort)
Stores the client side port range in active mode.
|
FTPSEnvironment |
withActualTotalSpaceCalculation(boolean calculateActualTotalSpace)
Deprecated.
FileStore.getTotalSpace() does not need to traverse the file system, because that would calculate the total used
space, not the total space. |
FTPSEnvironment |
withAuthCommand(String command)
Stores the AUTH command to use.
|
FTPSEnvironment |
withAutodetectEncoding(boolean autodetect)
Stores whether or not automatic server encoding detection should be enabled.
|
FTPSEnvironment |
withBufferSize(int bufferSize)
Stores the buffer size to use.
|
FTPSEnvironment |
withCharset(Charset charset)
Stores the charset to use.
|
FTPSEnvironment |
withClientConfig(FTPClientConfig clientConfig)
Stores the FTP client config to use.
|
FTPSEnvironment |
withClientConnectionCount(int count)
Stores the number of client connections to use.
|
FTPSEnvironment |
withClientConnectionWaitTimeout(long timeout)
Stores the wait timeout to use for retrieving client connection from the connection pool.
|
FTPSEnvironment |
withClientConnectionWaitTimeout(long duration,
TimeUnit unit)
Stores the wait timeout to use for retrieving client connections from the connection pool.
|
FTPSEnvironment |
withConnectionMode(ConnectionMode connectionMode)
Stores the connection mode to use.
|
FTPSEnvironment |
withConnectTimeout(int timeout)
Stores the connection timeout to use.
|
FTPSEnvironment |
withControlEncoding(String encoding)
Stores the character encoding to be used by the FTP control connection.
|
FTPSEnvironment |
withControlKeepAliveReplyTimeout(int timeout)
Stores how long to wait for control keep-alive message replies.
|
FTPSEnvironment |
withControlKeepAliveTimeout(long timeout)
Stores the time to wait between sending control connection keep-alive messages when processing file upload or download.
|
FTPSEnvironment |
withCredentials(String username,
char[] password)
Stores the credentials to use.
|
FTPSEnvironment |
withCredentials(String username,
char[] password,
String account)
Stores the credentials to use.
|
FTPSEnvironment |
withDataTimeout(int timeout)
Stores the timeout in milliseconds to use when reading from data connections.
|
FTPSEnvironment |
withDefaultDirectory(String pathname)
Stores the default directory to use.
|
FTPSEnvironment |
withEnabledCipherSuites(String... cipherSuites)
Stores the names of the cipher suites which could be enabled for use on connections.
|
FTPSEnvironment |
withEnabledProtocols(String... protocolVersions)
Stores which particular protocol versions are enabled for use on connections.
|
FTPSEnvironment |
withEnabledSessionCreation(boolean established)
Stores whether or not new SSL sessions may be established by sockets.
|
FTPSEnvironment |
withEndpointCheckingEnabled(boolean enabled)
Stores whether or not endpoint identification using the HTTPS algorithm should be enabled.
|
FTPSEnvironment |
withFileSystemExceptionFactory(FileSystemExceptionFactory factory)
Stores the file system exception factory to use.
|
FTPSEnvironment |
withFTPFileStrategyFactory(FTPFileStrategyFactory factory)
Stores the FTP file strategy factory to use.
|
FTPSEnvironment |
withHostnameVerifier(HostnameVerifier hostnameVerifier)
Stores the hostname verifier to use.
|
FTPSEnvironment |
withKeepAlive(boolean keepAlive)
Stores whether or not
SO_KEEPALIVE should be enabled. |
FTPSEnvironment |
withKeyManager(KeyManager keyManager)
Stores the key manager to use.
|
FTPSEnvironment |
withLocalAddress(InetAddress localAddr,
int localPort)
Stores the local address to use.
|
FTPSEnvironment |
withNeedClientAuth(boolean needClientAuth)
Stores whether or not sockets will require client authentication.
|
FTPSEnvironment |
withParserFactory(FTPFileEntryParserFactory parserFactory)
Stores the factory used for parser creation.
|
FTPSEnvironment |
withPassiveLocalIPAddress(String ipAddress)
Stores the local IP address to use in passive mode.
|
FTPSEnvironment |
withPassiveNatWorkaround(boolean enabled)
Deprecated.
|
FTPSEnvironment |
withPassiveNatWorkaroundStrategy(FTPClient.HostnameResolver resolver)
Stores the workaround strategy to replace the PASV mode reply addresses.
|
FTPSEnvironment |
withProtocol(String protocol)
Stores the protocol to use.
|
FTPSEnvironment |
withProxy(Proxy proxy)
Stores the proxy to use.
|
FTPSEnvironment |
withReceiveBufferSize(int size)
Stores the socket receive buffer size to use.
|
FTPSEnvironment |
withReceiveDataSocketBufferSize(int bufferSize)
Stores the value to use for the data socket
SO_RCVBUF option. |
FTPSEnvironment |
withRemoteVerificationEnabled(boolean enabled)
Stores whether or not verification that the remote host taking part of a data connection is the same as the host to which the control
connection is attached should be enabled.
|
FTPSEnvironment |
withReportActiveExternalIPAddress(String ipAddress)
Stores the external IP address to report in EPRT/PORT commands in active mode.
|
FTPSEnvironment |
withSecurityMode(SecurityMode securityMode)
Stores the security mode to use.
|
FTPSEnvironment |
withSendBufferSize(int size)
Stores the socket send buffer size to use.
|
FTPSEnvironment |
withSendDataSocketBufferSize(int bufferSizr)
Stores the value to use for the data socket
SO_SNDBUF option. |
FTPSEnvironment |
withServerSocketFactory(ServerSocketFactory factory)
Stores the server socket factory to use.
|
FTPSEnvironment |
withSocketFactory(SocketFactory factory)
Stores the socket factory to use.
|
FTPSEnvironment |
withSoLinger(boolean on,
int linger)
Stores whether or not
SO_LINGER should be enabled, and if so, the linger time. |
FTPSEnvironment |
withSoTimeout(int timeout)
Stores the socket timeout.
|
FTPSEnvironment |
withSSLContext(SSLContext sslContext)
Stores the SSL context to use.
|
FTPSEnvironment |
withStrictlyMultilineParsing(boolean strictMultilineParsing)
Stores whether or not strict multiline parsing should be enabled, as per RFC 959, section 4.2.
|
FTPSEnvironment |
withTcpNoDelay(boolean on)
Stores whether or not the Nagle's algorithm (
TCP_NODELAY) should be enabled. |
FTPSEnvironment |
withTrustManager(TrustManager trustManager)
Stores the trust manager to use.
|
FTPSEnvironment |
withUseClientMode(boolean useClientMode)
Stores whether or not sockets are set to use client mode in their first handshake.
|
FTPSEnvironment |
withUseEPSVwithIPv4(boolean selected)
Stores whether or not to use EPSV with IPv4.
|
FTPSEnvironment |
withWantClientAuth(boolean wantClientAuth)
Stores whether or not sockets will request client authentication.
|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic FTPSEnvironment withLocalAddress(InetAddress localAddr, int localPort)
FTPEnvironmentwithLocalAddress in class FTPEnvironmentlocalAddr - The local address to use.localPort - The local port to use.Socket.bind(SocketAddress),
InetSocketAddress.InetSocketAddress(InetAddress, int)public FTPSEnvironment withCredentials(String username, char[] password)
FTPEnvironmentwithCredentials in class FTPEnvironmentusername - The username to use.password - The password to use.public FTPSEnvironment withCredentials(String username, char[] password, String account)
FTPEnvironmentwithCredentials in class FTPEnvironmentusername - The username to use.password - The password to use.account - The account to use.public FTPSEnvironment withSoTimeout(int timeout)
FTPEnvironmentwithSoTimeout in class FTPEnvironmenttimeout - The socket timeout in milliseconds.Socket.setSoTimeout(int)public FTPSEnvironment withSendBufferSize(int size)
FTPEnvironmentwithSendBufferSize in class FTPEnvironmentsize - The size of the buffer in bytes.Socket.setSendBufferSize(int)public FTPSEnvironment withReceiveBufferSize(int size)
FTPEnvironmentwithReceiveBufferSize in class FTPEnvironmentsize - The size of the buffer in bytes.Socket.setReceiveBufferSize(int)public FTPSEnvironment withTcpNoDelay(boolean on)
FTPEnvironmentTCP_NODELAY) should be enabled.withTcpNoDelay in class FTPEnvironmenton - true if Nagle's algorithm should be enabled, or false otherwise.Socket.setTcpNoDelay(boolean)public FTPSEnvironment withKeepAlive(boolean keepAlive)
FTPEnvironmentSO_KEEPALIVE should be enabled.withKeepAlive in class FTPEnvironmentkeepAlive - true if keep-alive should be enabled, or false otherwise.Socket.setKeepAlive(boolean)public FTPSEnvironment withSoLinger(boolean on, int linger)
FTPEnvironmentSO_LINGER should be enabled, and if so, the linger time.withSoLinger in class FTPEnvironmenton - true if SO_LINGER should be enabled, or false otherwise.linger - The linger time in seconds, if on is true.Socket.setSoLinger(boolean, int)public FTPSEnvironment withSocketFactory(SocketFactory factory)
FTPEnvironmentwithSocketFactory in class FTPEnvironmentfactory - The socket factory to use.public FTPSEnvironment withServerSocketFactory(ServerSocketFactory factory)
FTPEnvironmentwithServerSocketFactory in class FTPEnvironmentfactory - The server socket factory to use.public FTPSEnvironment withConnectTimeout(int timeout)
FTPEnvironmentwithConnectTimeout in class FTPEnvironmenttimeout - The connection timeout in milliseconds.Socket.connect(SocketAddress, int)public FTPSEnvironment withProxy(Proxy proxy)
FTPEnvironmentwithProxy in class FTPEnvironmentproxy - The proxy to use.public FTPSEnvironment withCharset(Charset charset)
FTPEnvironmentwithCharset in class FTPEnvironmentcharset - The charset to use.public FTPSEnvironment withControlEncoding(String encoding)
FTPEnvironmentwithControlEncoding in class FTPEnvironmentencoding - The character encoding to use.public FTPSEnvironment withStrictlyMultilineParsing(boolean strictMultilineParsing)
FTPEnvironmentwithStrictlyMultilineParsing in class FTPEnvironmentstrictMultilineParsing - true to enable strict multiline parsing, or false to disable it.public FTPSEnvironment withDataTimeout(int timeout)
FTPEnvironmentwithDataTimeout in class FTPEnvironmenttimeout - The timeout in milliseconds that is used when opening data connection sockets.public FTPSEnvironment withParserFactory(FTPFileEntryParserFactory parserFactory)
FTPEnvironmentwithParserFactory in class FTPEnvironmentparserFactory - The factory object used to create FTPFileEntryParserspublic FTPSEnvironment withRemoteVerificationEnabled(boolean enabled)
FTPEnvironmentwithRemoteVerificationEnabled in class FTPEnvironmentenabled - true to enable verification, or false to disable verification.public FTPSEnvironment withDefaultDirectory(String pathname)
FTPEnvironmentwithDefaultDirectory in class FTPEnvironmentpathname - The default directory to use.public FTPSEnvironment withConnectionMode(ConnectionMode connectionMode)
FTPEnvironmentConnectionMode.ACTIVE.withConnectionMode in class FTPEnvironmentconnectionMode - The connection mode to use.public FTPSEnvironment withActivePortRange(int minPort, int maxPort)
FTPEnvironmentwithActivePortRange in class FTPEnvironmentminPort - The lowest available port (inclusive).maxPort - The highest available port (inclusive).public FTPSEnvironment withActiveExternalIPAddress(String ipAddress)
FTPEnvironmentwithActiveExternalIPAddress in class FTPEnvironmentipAddress - The external IP address of this machine.public FTPSEnvironment withPassiveLocalIPAddress(String ipAddress)
FTPEnvironmentwithPassiveLocalIPAddress in class FTPEnvironmentipAddress - The local IP address of this machine.public FTPSEnvironment withReportActiveExternalIPAddress(String ipAddress)
FTPEnvironmentwithReportActiveExternalIPAddress in class FTPEnvironmentipAddress - The external IP address of this machine.public FTPSEnvironment withBufferSize(int bufferSize)
FTPEnvironmentwithBufferSize in class FTPEnvironmentbufferSize - The buffer size to use.public FTPSEnvironment withSendDataSocketBufferSize(int bufferSizr)
FTPEnvironmentSO_SNDBUF option.withSendDataSocketBufferSize in class FTPEnvironmentbufferSizr - The size of the buffer.public FTPSEnvironment withReceiveDataSocketBufferSize(int bufferSize)
FTPEnvironmentSO_RCVBUF option.withReceiveDataSocketBufferSize in class FTPEnvironmentbufferSize - The size of the buffer.public FTPSEnvironment withClientConfig(FTPClientConfig clientConfig)
FTPEnvironmentwithClientConfig in class FTPEnvironmentclientConfig - The client config to use.public FTPSEnvironment withUseEPSVwithIPv4(boolean selected)
FTPEnvironmentFor example, when using IPv4 with NAT it may work with some rare configurations. E.g. if FTP server has a static PASV address (external network) and the client is coming from another internal network. In that case the data connection after PASV command would fail, while EPSV would make the client succeed by taking just the port.
withUseEPSVwithIPv4 in class FTPEnvironmentselected - The flag to use.public FTPSEnvironment withControlKeepAliveTimeout(long timeout)
FTPEnvironmentwithControlKeepAliveTimeout in class FTPEnvironmenttimeout - The keep-alive timeout to use, in milliseconds.public FTPSEnvironment withControlKeepAliveReplyTimeout(int timeout)
FTPEnvironmentwithControlKeepAliveReplyTimeout in class FTPEnvironmenttimeout - The keep-alive reply timeout to use, in milliseconds.@Deprecated public FTPSEnvironment withPassiveNatWorkaround(boolean enabled)
withPassiveNatWorkaroundStrategy(FTPClient.HostnameResolver) instead.withPassiveNatWorkaround in class FTPEnvironmentenabled - true to enable replacing internal IP's in passive mode, or false otherwise.public FTPSEnvironment withPassiveNatWorkaroundStrategy(FTPClient.HostnameResolver resolver)
FTPClient.NatServerResolverImpl, i.e. site-local replies are replaced.withPassiveNatWorkaroundStrategy in class FTPEnvironmentresolver - The workaround strategy to replace internal IP's in passive mode, or null to disable the workaround
(i.e. use PASV mode reply address.)public FTPSEnvironment withAutodetectEncoding(boolean autodetect)
FTPEnvironmentwithAutodetectEncoding in class FTPEnvironmentautodetect - true to enable automatic server encoding detection, or false to disable it.public FTPSEnvironment withClientConnectionCount(int count)
FTPEnvironmentwithClientConnectionCount in class FTPEnvironmentcount - The number of client connection to use.public FTPSEnvironment withClientConnectionWaitTimeout(long timeout)
FTPEnvironment
If the timeout is not larger than 0, the FTP file system waits indefinitely until a client connection becomes available.
withClientConnectionWaitTimeout in class FTPEnvironmenttimeout - The timeout in milliseconds.FTPEnvironment.withClientConnectionWaitTimeout(long, TimeUnit)public FTPSEnvironment withClientConnectionWaitTimeout(long duration, TimeUnit unit)
FTPEnvironment
If the timeout is not larger than 0, the FTP file system waits indefinitely until a client connection becomes available.
withClientConnectionWaitTimeout in class FTPEnvironmentduration - The timeout duration.unit - The timeout unit.FTPEnvironment.withClientConnectionWaitTimeout(long)public FTPSEnvironment withFileSystemExceptionFactory(FileSystemExceptionFactory factory)
FTPEnvironmentwithFileSystemExceptionFactory in class FTPEnvironmentfactory - The file system exception factory to use.public FTPSEnvironment withFTPFileStrategyFactory(FTPFileStrategyFactory factory)
FTPEnvironmentwithFTPFileStrategyFactory in class FTPEnvironmentfactory - The FTP file strategy factory to use.@Deprecated public FTPSEnvironment withAbsoluteFilePathSupport(boolean supportAbsoluteFilePaths)
withFTPFileStrategyFactory(FTPFileStrategyFactory) instead. A value of true should be replaced with
FTPFileStrategyFactory.AUTO_DETECT, a value of false with FTPFileStrategyFactory.NON_UNIX.FTPEnvironmentfalse, getting information about a file will list its
parent directory. If set to true, the server settings will determine how files are listed.
This setting should be set to false for servers that do not support LIST commands of absolute files.
withAbsoluteFilePathSupport in class FTPEnvironmentsupportAbsoluteFilePaths - false if FTP servers do not support absolute paths to list files,
or true to use the server settings.@Deprecated public FTPSEnvironment withActualTotalSpaceCalculation(boolean calculateActualTotalSpace)
FileStore.getTotalSpace() does not need to traverse the file system, because that would calculate the total used
space, not the total space.FTPEnvironmentFileStore.getTotalSpace() should calculate the actual total space by traversing the file system.
If not explicitly set to true, the method will return Long.MAX_VALUE instead.withActualTotalSpaceCalculation in class FTPEnvironmentcalculateActualTotalSpace - true if FileStore.getTotalSpace() should calculate the actual total space by traversing the
file system, or false otherwise.public FTPSEnvironment withSecurityMode(SecurityMode securityMode)
SecurityMode.EXPLICIT.securityMode - The security mode to use.public FTPSEnvironment withSSLContext(SSLContext sslContext)
protocol will be used instead.sslContext - The SSL context to use.public FTPSEnvironment withProtocol(String protocol)
TLS.
The protocol will be ignored if an SSLContext is stored.protocol - The protocol to use.public FTPSEnvironment withAuthCommand(String command)
command - The AUTH command to use.public FTPSEnvironment withKeyManager(KeyManager keyManager)
keyManager - The key manager to use.SSLContext.init(KeyManager[], TrustManager[], SecureRandom)public FTPSEnvironment withTrustManager(TrustManager trustManager)
trustManager - The trust manager to use.SSLContext.init(KeyManager[], TrustManager[], SecureRandom)public FTPSEnvironment withHostnameVerifier(HostnameVerifier hostnameVerifier)
client mode connections.hostnameVerifier - The hostname verifier to use.public FTPSEnvironment withEndpointCheckingEnabled(boolean enabled)
client mode connections.enabled - true if endpoint identification should be enabled, or false if it should be disabled.SSLSocket.setSSLParameters(SSLParameters),
SSLParameters.setEndpointIdentificationAlgorithm(String)public FTPSEnvironment withEnabledSessionCreation(boolean established)
established - The established socket flag.SSLSocket.setEnableSessionCreation(boolean)public FTPSEnvironment withNeedClientAuth(boolean needClientAuth)
needClientAuth - The need client authentication flag.SSLSocket.setNeedClientAuth(boolean)public FTPSEnvironment withWantClientAuth(boolean wantClientAuth)
wantClientAuth - The want client authentication flag.SSLSocket.setWantClientAuth(boolean)public FTPSEnvironment withUseClientMode(boolean useClientMode)
useClientMode - The use client mode flag.SSLSocket.setUseClientMode(boolean)public FTPSEnvironment withEnabledCipherSuites(String... cipherSuites)
cipherSuites - The names of the cipher suites to use.SSLSocket.setEnabledCipherSuites(String[])public FTPSEnvironment withEnabledProtocols(String... protocolVersions)
protocolVersions - The protocol versions to use.SSLSocket.setEnabledProtocols(String[])public FTPSEnvironment clone()
clone in class FTPEnvironmentCopyright © 2016–2019. All rights reserved.