org.apache.commons.net.ftp
Class FTPFileEntryParserImpl
java.lang.Object
org.apache.commons.net.ftp.FTPFileEntryParserImpl
- FTPFileEntryParser
public abstract class FTPFileEntryParserImpl
extends java.lang.Object
implements FTPFileEntryParser
This abstract class implements both the older FTPFileListParser and
newer FTPFileEntryParser interfaces with default functionality.
All the classes in the parser subpackage inherit from this.
List | preParse(List original) - This method is a hook for those implementors (such as
VMSVersioningFTPEntryParser, and possibly others) which need to
perform some action upon the FTPFileList after it has been created
from the server stream, but before any clients see the list.
|
String | readNextEntry(BufferedReader reader) - Reads the next entry using the supplied BufferedReader object up to
whatever delemits one entry from the next.
|
FTPFileEntryParserImpl
public FTPFileEntryParserImpl()
The constructor for a FTPFileEntryParserImpl object.
preParse
public List preParse(List original)
This method is a hook for those implementors (such as
VMSVersioningFTPEntryParser, and possibly others) which need to
perform some action upon the FTPFileList after it has been created
from the server stream, but before any clients see the list.
This default implementation removes entries that do not parse as files.
original
- Original list after it has been created from the server stream
readNextEntry
public String readNextEntry(BufferedReader reader)
throws IOException
Reads the next entry using the supplied BufferedReader object up to
whatever delemits one entry from the next. This default implementation
simply calls BufferedReader.readLine().
reader
- The BufferedReader object from which entries are to be
read.
- A string representing the next ftp entry or null if none found.