Package com.enterprisedt.net.ftp
Class FTPFileFactory
java.lang.Object
com.enterprisedt.net.ftp.FTPFileFactory
Factory for creating FTPFile objects
- Version:
- $Revision$
- Author:
- Bruce Blackshaw
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFTPFileFactory(FTPFileParser parser) Constructor.FTPFileFactory(String system) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParser(FTPFileParser parser) Rather than forcing a parser (as in the constructor that accepts a parser), this adds a parser to the list of those used.voiddetectParser(String[] files) Get the SYST stringReturn a reference to the VMS parser being used.Parse a single line of file listingFTPFile[]Parse an array of raw file information returned from the FTP servervoidSet the locale for date parsing of listingsvoidsetLocales(Locale[] locales) Set the locales to try for date parsing of listingstoString()
-
Field Details
-
cvsId
Revision control id- See Also:
-
-
Constructor Details
-
FTPFileFactory
Constructor- Parameters:
system- SYST string- Throws:
FTPException
-
FTPFileFactory
Constructor. User supplied parser. Note that parser rotation (in case of a ParseException) is disabled if a parser is explicitly supplied- Parameters:
parser- the parser to use
-
-
Method Details
-
toString
-
getVMSParser
Return a reference to the VMS parser being used. This allows the user to set VMS-specific settings on the parser.- Returns:
- VMSFileParser object
-
addParser
Rather than forcing a parser (as in the constructor that accepts a parser), this adds a parser to the list of those used.- Parameters:
parser- user supplied parser to add
-
setLocale
Set the locale for date parsing of listings- Parameters:
locale- locale to set
-
setLocales
Set the locales to try for date parsing of listings- Parameters:
locales- locales to try
-
detectParser
-
parse
Parse a single line of file listing- Parameters:
line-- Returns:
- FTPFile
- Throws:
ParseException
-
parse
Parse an array of raw file information returned from the FTP server- Parameters:
files- array of strings- Returns:
- array of FTPFile objects
- Throws:
ParseException
-
getSystem
Get the SYST string- Returns:
- the system string.
-