public final class MLSDParser extends java.lang.Object implements FtpFileParser
| Constructor and Description |
|---|
MLSDParser() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
getDateTime(FtpFile file)
Gets the date and time for an FtpFile entry sourced from an MLSD directory listing.
|
java.util.Date |
getFileDate(java.lang.String date)
Parses a string which contains a date and returns a date object
|
java.util.Enumeration |
parse(java.io.BufferedReader in)
Method for parsing a directory listing returned by FTP server.
|
FtpFile |
parse(java.lang.String line)
Parses file description line.
|
public FtpFile parse(java.lang.String line)
line - line to parsepublic java.util.Enumeration parse(java.io.BufferedReader in)
throws java.io.IOException
FtpFileParserparse in interface FtpFileParserin - a BufferedReader passed in by Ftp class when invoking Ftp#getDirListing methodEnumeration of FtpFilejava.io.IOException - if an I/O or FTP related error occursFtpFileParser.parse(java.io.BufferedReader)public java.util.Date getFileDate(java.lang.String date)
getFileDate in interface FtpFileParserdate - The string will be parsedjava.text.ParseException - if an error ocurrspublic java.util.Date getDateTime(FtpFile file) throws java.text.ParseException
getDateTime in interface FtpFileParserfile - the FtpFilejava.text.ParseException - if an error occurs while parsing entryFtpFileCopyright © JSCAPE LLC. 1999-2021. All Rights Reserved