org.xbib.io.ftp.client.parser.FTPTimestampParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ftp-client Show documentation
Show all versions of ftp-client Show documentation
Java FTP client, Java FTP NIO file system, Groovy FTP client
package org.xbib.io.ftp.client.parser;
import java.time.ZonedDateTime;
/**
* This interface specifies the concept of parsing an FTP server's timestamp.
*/
public interface FTPTimestampParser {
String DEFAULT_DATE_FORMAT = "MMM d yyyy"; //Nov 9 2001
String DEFAULT_RECENT_DATE_FORMAT = "MMM d HH:mm"; //Nov 9 20:06
String NUMERIC_DATE_FORMAT = "yyyy-MM-dd HH:mm"; //2001-11-09 20:06
/**
* Parses the supplied date stamp parameter. This parameter typically would
* have been pulled from a longer FTP listing via the regular expression
* mechanism.
*
* @param timestampStr - the timestamp portion of the FTP directory listing to be parsed
* @return a {@link java.time.ZonedDateTime} object initialized to the date
* parsed by the parser
*/
ZonedDateTime parseTimestamp(String timestampStr);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy