public class AS400Parser extends java.lang.Object implements FtpFileParser
agonzalez 1148 07/12/06 17:15:29 *DIR Archive/ agonzalez 1288 08/07/06 14:19:08 *STMF eye.asc agonzalez 4096 01/01/70 02:00:00 *STMF jaaseIt ignores the i5 object groups entries and only parses the *DIR and *STMF entries
Constructor and Description |
---|
AS400Parser() |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getDateTime(FtpFile file)
Gets the date and time for an FtpFile entry sourced from an AS400 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)
Parses directory listing.
|
public java.util.Enumeration parse(java.io.BufferedReader in) throws java.io.IOException
parse
in interface FtpFileParser
in
- the BufferedReader passed in by Ftp class when invoking Ftp#getDirListing method.java.io.IOException
- if an I/O or FTP related error occursFtpFile
,
Ftp.getDirListing(java.lang.String)
public java.util.Date getFileDate(java.lang.String date) throws java.text.ParseException
getFileDate
in interface FtpFileParser
date
- The string will be parsedjava.text.ParseException
- if an error ocurrspublic java.util.Date getDateTime(FtpFile file) throws java.text.ParseException
getDateTime
in interface FtpFileParser
file
- the FtpFilejava.text.ParseException
- if an error occurs while parsing entryFtpFile
Copyright © JSCAPE LLC. 1999-2023. All Rights Reserved