Class FtpFileSystemConfigBuilder
- Direct Known Subclasses:
- FtpsFileSystemConfigBuilder
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedFtpFileSystemConfigBuilder(String prefix) Create new config builder with specified prefix string.
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.commons.lang3.Range<Integer> getActivePortRange(FileSystemOptions options) Gets the active port range.getAutodetectUtf8(FileSystemOptions options) Gets whether to try to autodetect the server encoding (only UTF8 is supported).protected Class<? extends FileSystem> Gets the target of this configuration.getConnectTimeout(FileSystemOptions options) Deprecated.Gets the timeout in milliseconds to use for the socket connection.getControlEncoding(FileSystemOptions options) Gets the control encoding.Gets the controlKeepAliveReplyTimeout duration.Gets the controlKeepAliveTimeout duration.getDataTimeout(FileSystemOptions options) Deprecated.getDataTimeoutDuration(FileSystemOptions options) Gets the timeout for opening the data channel.getDefaultDateFormat(FileSystemOptions options) Gets the default date format used by the server.getEntryParser(FileSystemOptions options) Gets the key to the EntryParser.org.apache.commons.net.ftp.parser.FTPFileEntryParserFactorygetEntryParserFactory(FileSystemOptions options) Gets the FTPFileEntryParserFactory parameter.getFileType(FileSystemOptions options) Gets the file type parameter.static FtpFileSystemConfigBuilderGets the singleton instance.getMdtmLastModifiedTime(FileSystemOptions options) Gets the option to use FTP MDTM forFileContent.getLastModifiedTime().getPassiveMode(FileSystemOptions options) Tests whether passive mode is set.getProxy(FileSystemOptions options) Gets the Proxy.getRecentDateFormat(FileSystemOptions options) SeeFTPClientConfigfor details and examples.getRemoteVerification(FileSystemOptions options) Gets whether to use remote verification.Gets special retry code.getServerLanguageCode(FileSystemOptions options) Gets the language code used by the server.getServerTimeZoneId(FileSystemOptions options) SeeFTPClientConfigfor details and examples.String[]getShortMonthNames(FileSystemOptions options) SeeFTPClientConfigfor details and examples.getSoTimeout(FileSystemOptions options) Deprecated.getSoTimeoutDuration(FileSystemOptions options) Gets The so timeout duration.Gets the list of reply codes (apart from 200) that are considered as OK when prematurely closing a stream.getUserDirIsRoot(FileSystemOptions options) Tests whether if VFS should treat the user directory as the root directory.voidsetActivePortRange(FileSystemOptions options, org.apache.commons.lang3.Range<Integer> portRange) Sets the active port range.voidsetAutodetectUtf8(FileSystemOptions options, Boolean autodetectUTF8) Sets whether to try to autodetect the server encoding (only UTF8 is supported).voidsetConnectTimeout(FileSystemOptions options, Integer duration) Deprecated.voidsetConnectTimeout(FileSystemOptions options, Duration duration) Sets the timeout for the initial control connection.voidsetControlEncoding(FileSystemOptions options, String encoding) SeeFTP.setControlEncoding(java.lang.String)for details and examples.voidsetControlKeepAliveReplyTimeout(FileSystemOptions options, Duration duration) Sets the control keep alive reply timeout for the FTP client.voidsetControlKeepAliveTimeout(FileSystemOptions options, Duration duration) Sets the control keep alive timeout for the FTP client.voidsetDataTimeout(FileSystemOptions options, Integer duration) Deprecated.voidsetDataTimeout(FileSystemOptions options, Duration duration) Sets the data timeout for the FTP client.voidsetDefaultDateFormat(FileSystemOptions options, String defaultDateFormat) Sets the default date format used by the server.voidsetEntryParser(FileSystemOptions options, String key) Sets the FQCN of your FileEntryParser used to parse the directory listing from your server.voidsetEntryParserFactory(FileSystemOptions options, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory) FTPFileEntryParserFactory which will be used for ftp-entry parsing.voidsetFileType(FileSystemOptions options, FtpFileType ftpFileType) Sets the file type parameter.voidsetMdtmLastModifiedTime(FileSystemOptions options, boolean mdtm) Sets the option to use FTP MDTM forFileContent.getLastModifiedTime().voidsetPassiveMode(FileSystemOptions options, boolean passiveMode) Enter into passive mode.voidsetProxy(FileSystemOptions options, Proxy proxy) Sets the Proxy.voidsetRecentDateFormat(FileSystemOptions options, String recentDateFormat) SeeFTPClientConfigfor details and examples.voidsetRemoteVerification(FileSystemOptions options, boolean remoteVerification) Sets whether to use remote verification.voidsetServerLanguageCode(FileSystemOptions options, String serverLanguageCode) Sets the language code used by the server.voidsetServerTimeZoneId(FileSystemOptions options, String serverTimeZoneId) SeeFTPClientConfigfor details and examples.voidsetShortMonthNames(FileSystemOptions options, String[] shortMonthNames) SeeFTPClientConfigfor details and examples.voidsetSoTimeout(FileSystemOptions options, Integer timeout) Deprecated.voidsetSoTimeout(FileSystemOptions options, Duration timeout) Sets the socket timeout for the FTP client.voidsetTransferAbortedOkReplyCodes(FileSystemOptions options, List<Integer> replyCodes) Sets the list of reply codes that are considered as OK when prematurely closing a stream.voidsetUserDirIsRoot(FileSystemOptions options, boolean userDirIsRoot) Use user directory as root (do not change to fs root).Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuildergetBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getDuration, getDuration, getDurationInteger, getDurationInteger, getEnum, getEnum, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getParamOrDefault, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setParam, setRootURI, toBooleanObject
- 
Constructor Details- 
FtpFileSystemConfigBuilderCreate new config builder with specified prefix string.- Parameters:
- prefix- prefix string to use for parameters of this config builder.
- Since:
- 2.1
 
 
- 
- 
Method Details- 
getInstanceGets the singleton instance.- Returns:
- the singleton instance.
 
- 
getSaneTransferAbortedOkReplyCodesGets special retry code. See VFS-674, its accompanying PR and https://github.com/apache/commons-vfs/pull/51 as to why 426 and 550 are here.- Returns:
- special retry code.
 
- 
getActivePortRangeGets the active port range.- Parameters:
- options- The FileSystemOptions.
- Returns:
- the Range of active ports
- Since:
- 2.10.0
 
- 
getAutodetectUtf8Gets whether to try to autodetect the server encoding (only UTF8 is supported).- Parameters:
- options- The FileSystemOptions.
- Returns:
- True if autodetection should be done.
- Since:
- 2.4
 
- 
getConfigClassDescription copied from class:FileSystemConfigBuilderGets the target of this configuration.- Specified by:
- getConfigClassin class- FileSystemConfigBuilder
- Returns:
- the specific file system class
 
- 
getConnectTimeoutDeprecated.Gets the timeout in milliseconds to use for the socket connection.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The timeout in milliseconds to use for the socket connection.
- Since:
- 2.1
 
- 
getConnectTimeoutDurationGets the timeout in milliseconds to use for the socket connection.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The timeout in milliseconds to use for the socket connection.
- Since:
- 2.8.0
 
- 
getControlEncodingGets the control encoding.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The control encoding.
- Since:
- 2.0
 
- 
getControlKeepAliveReplyTimeoutGets the controlKeepAliveReplyTimeout duration.- Parameters:
- options- The FileSystem options
- Returns:
- The controlKeepAliveReplyTimeout duration.
- Since:
- 2.8.0
 
- 
getControlKeepAliveTimeoutGets the controlKeepAliveTimeout duration.- Parameters:
- options- The FileSystem options
- Returns:
- The controlKeepAliveTimeout duration.
- Since:
- 2.8.0
 
- 
getDataTimeoutDeprecated.Gets timeout for opening the data channel in milliseconds.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The timeout for opening the data channel in milliseconds.
- See Also:
 
- 
getDataTimeoutDurationGets the timeout for opening the data channel.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The timeout for opening the data channel.
- Since:
- 2.8.0
- See Also:
 
- 
getDefaultDateFormatGets the default date format used by the server. SeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions
- Returns:
- The default date format.
 
- 
getEntryParserGets the key to the EntryParser.- Parameters:
- options- The FileSystemOptions.
- Returns:
- the key to the EntryParser.
- See Also:
 
- 
getEntryParserFactorypublic org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions options) Gets the FTPFileEntryParserFactory parameter.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The FTPFileEntryParserFactory parameter.
- See Also:
 
- 
getFileTypeGets the file type parameter.- Parameters:
- options- The FileSystemOptions.
- Returns:
- A FtpFileType
- Since:
- 2.1
 
- 
getMdtmLastModifiedTimeGets the option to use FTP MDTM forFileContent.getLastModifiedTime().- Parameters:
- options- The FileSystemOptions.
- Returns:
- true if MDTM should be used.
- Since:
- 2.8.0
 
- 
getPassiveModeTests whether passive mode is set.- Parameters:
- options- The FileSystemOptions.
- Returns:
- whether passive mode is set.
- See Also:
 
- 
getProxyGets the Proxy.- Parameters:
- options- The FileSystemOptions.
- Returns:
- the Proxy
- Since:
- 2.1
 
- 
getRecentDateFormatSeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The recent date format.
 
- 
getRemoteVerificationGets whether to use remote verification.- Parameters:
- options- The FileSystemOptions.
- Returns:
- True if remote verification should be done.
 
- 
getServerLanguageCodeGets the language code used by the server. SeeFTPClientConfigfor details and examples.- Parameters:
- options- The FilesystemOptions.
- Returns:
- The language code of the server.
 
- 
getServerTimeZoneIdSeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- Returns:
- The server timezone id.
 
- 
getShortMonthNamesSeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- Returns:
- An array of short month names.
 
- 
getSoTimeoutDeprecated.Gets The so timeout duration in milliseconds.- Parameters:
- options- The FileSystem options.
- Returns:
- The so timeout duration in milliseconds.
- Since:
- 2.0
- See Also:
 
- 
getSoTimeoutDurationGets The so timeout duration.- Parameters:
- options- The FileSystem options.
- Returns:
- The timeout value in milliseconds.
- Since:
- 2.8.0
- See Also:
 
- 
getTransferAbortedOkReplyCodesGets the list of reply codes (apart from 200) that are considered as OK when prematurely closing a stream.- Parameters:
- options- The FileSystem options.
- Returns:
- The list of reply codes (apart from 200) that are considered as OK when prematurely closing a stream.
- Since:
- 2.4
 
- 
getUserDirIsRootTests whether if VFS should treat the user directory as the root directory. Defaults toBoolean.TRUEif the methodsetUserDirIsRoot(FileSystemOptions, boolean)has not been invoked.- Parameters:
- options- The FileSystemOptions.
- Returns:
- Boolean.TRUEif VFS treats the user directory as the root directory.
- See Also:
 
- 
setActivePortRangepublic void setActivePortRange(FileSystemOptions options, org.apache.commons.lang3.Range<Integer> portRange) Sets the active port range.- Parameters:
- options- The FileSystemOptions.
- portRange- the Range of active ports
- Since:
- 2.10.0
 
- 
setAutodetectUtf8Sets whether to try to autodetect the server encoding (only UTF8 is supported).- Parameters:
- options- The FileSystemOptions.
- autodetectUTF8- true if autodetection should be done.
- Since:
- 2.4
 
- 
setConnectTimeoutSets the timeout for the initial control connection.If you set the connectTimeout to nullno connectTimeout will be set.- Parameters:
- options- The FileSystemOptions.
- duration- the timeout duration in milliseconds
- Since:
- 2.8.0
 
- 
setConnectTimeoutDeprecated.Sets the timeout for the initial control connection.If you set the connectTimeout to nullno connectTimeout will be set.- Parameters:
- options- The FileSystemOptions.
- duration- the timeout duration.
- Since:
- 2.1
 
- 
setControlEncodingSeeFTP.setControlEncoding(java.lang.String)for details and examples.- Parameters:
- options- The FileSystemOptions.
- encoding- the encoding to use
- Since:
- 2.0
 
- 
setControlKeepAliveReplyTimeoutSets the control keep alive reply timeout for the FTP client.- Parameters:
- options- The FileSystem options.
- duration- timeout duration.
- Since:
- 2.8.0
 
- 
setControlKeepAliveTimeoutSets the control keep alive timeout for the FTP client.Sets the controlKeepAliveTimeoutto ensure the socket be alive after download huge file.- Parameters:
- options- The FileSystem options.
- duration- The timeout duration.
- Since:
- 2.8.0
 
- 
setDataTimeoutSets the data timeout for the FTP client.If you set the dataTimeouttonull, no dataTimeout will be set on the FTP client.- Parameters:
- options- The FileSystemOptions.
- duration- The timeout duration.
- Since:
- 2.8.0
 
- 
setDataTimeoutDeprecated.Sets the data timeout for the FTP client.If you set the dataTimeouttonull, no dataTimeout will be set on the FTP client.- Parameters:
- options- The FileSystemOptions.
- duration- The timeout value.
 
- 
setDefaultDateFormatSets the default date format used by the server. SeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- defaultDateFormat- The default date format.
 
- 
setEntryParserSets the FQCN of your FileEntryParser used to parse the directory listing from your server.If you do not use the default commons-net FTPFileEntryParserFactory e.g. by using setEntryParserFactory(org.apache.commons.vfs2.FileSystemOptions, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory)this is the "key" parameter passed as argument into your custom factory.- Parameters:
- options- The FileSystemOptions.
- key- The key.
 
- 
setEntryParserFactorypublic void setEntryParserFactory(FileSystemOptions options, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory) FTPFileEntryParserFactory which will be used for ftp-entry parsing.- Parameters:
- options- The FileSystemOptions.
- factory- instance of your factory
 
- 
setFileTypeSets the file type parameter.- Parameters:
- options- The FileSystemOptions.
- ftpFileType- A FtpFileType
- Since:
- 2.1
 
- 
setMdtmLastModifiedTimeSets the option to use FTP MDTM forFileContent.getLastModifiedTime().- Parameters:
- options- The FileSystemOptions.
- mdtm- true if MDTM should be used.
- Since:
- 2.8.0
 
- 
setPassiveModeEnter into passive mode.- Parameters:
- options- The FileSystemOptions.
- passiveMode- true if passive mode should be used.
 
- 
setProxySets the Proxy.You might need to make sure that passive modeis activated.- Parameters:
- options- the FileSystem options.
- proxy- the Proxy
- Since:
- 2.1
 
- 
setRecentDateFormatSeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- recentDateFormat- The recent date format.
 
- 
setRemoteVerificationSets whether to use remote verification.- Parameters:
- options- The FileSystemOptions.
- remoteVerification- True if verification should be done.
 
- 
setServerLanguageCodeSets the language code used by the server. SeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- serverLanguageCode- The servers language code.
 
- 
setServerTimeZoneIdSeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- serverTimeZoneId- The server timezone id.
 
- 
setShortMonthNamesSeeFTPClientConfigfor details and examples.- Parameters:
- options- The FileSystemOptions.
- shortMonthNames- an array of short month name Strings.
 
- 
setSoTimeoutSets the socket timeout for the FTP client.If you set the soTimeouttonull, no socket timeout will be set on the FTP client.- Parameters:
- options- The FileSystem options.
- timeout- The timeout value in milliseconds.
- Since:
- 2.8.0
 
- 
setSoTimeoutDeprecated.Sets the socket timeout for the FTP client.If you set the soTimeouttonull, no socket timeout will be set on the FTP client.- Parameters:
- options- The FileSystem options.
- timeout- The timeout value in milliseconds.
- Since:
- 2.0
 
- 
setTransferAbortedOkReplyCodesSets the list of reply codes that are considered as OK when prematurely closing a stream.If you set the replyCodesto an empty list, all reply codes besides 200 will be considered as an error.- Parameters:
- options- The FileSystem options.
- replyCodes- The reply codes.
- Since:
- 2.4
 
- 
setUserDirIsRootUse user directory as root (do not change to fs root).- Parameters:
- options- The FileSystemOptions.
- userDirIsRoot- true if the user directory should be treated as the root.
 
 
- 
getConnectTimeoutDuration(FileSystemOptions).