public abstract class FTPFileParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignoreDateParseErrors
Ignore date parsing errors
|
Constructor and Description |
---|
FTPFileParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
isMultiLine()
Does this parser parse multiple lines to get one listing?
|
boolean |
isValidFormat(java.lang.String[] listing)
Valid format for this parser
|
abstract FTPFile |
parse(java.lang.String raw)
Parse server supplied string
|
void |
setIgnoreDateParseErrors(boolean ignore)
Ignore date parse errors
|
abstract void |
setLocale(java.util.Locale locale)
Set the locale for date parsing of listings
|
protected java.lang.String[] |
split(java.lang.String str)
Splits string consisting of fields separated by
whitespace into an array of strings.
|
protected java.lang.String[] |
split(java.lang.String str,
char token)
Splits string consisting of fields separated by
whitespace into an array of strings.
|
protected java.lang.String[] |
split(java.lang.String str,
com.enterprisedt.net.ftp.FTPFileParser.Splitter splitter)
Splits string consisting of fields separated by
whitespace into an array of strings.
|
protected java.lang.String |
trimStart(java.lang.String str)
Trim the start of the supplied string
|
protected boolean ignoreDateParseErrors
public abstract FTPFile parse(java.lang.String raw) throws java.text.ParseException
raw
- raw string to parsejava.text.ParseException
public abstract void setLocale(java.util.Locale locale)
locale
- locale to setpublic void setIgnoreDateParseErrors(boolean ignore)
ignore
- public boolean isValidFormat(java.lang.String[] listing)
listing
- listing to testpublic boolean isMultiLine()
protected java.lang.String trimStart(java.lang.String str)
str
- string to trimprotected java.lang.String[] split(java.lang.String str)
str
- string to splitprotected java.lang.String[] split(java.lang.String str, char token)
str
- string to splitprotected java.lang.String[] split(java.lang.String str, com.enterprisedt.net.ftp.FTPFileParser.Splitter splitter)
str
- string to splitCopyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.