| java.lang.Object org.apache.commons.net.ftp.FTPFileEntryParserImpl
All known Subclasses: org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl, org.apache.commons.net.ftp.parser.CompositeFileEntryParser,
FTPFileEntryParserImpl | abstract public class FTPFileEntryParserImpl implements FTPFileEntryParser,FTPFileListParser(Code) | | 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.
|
Method Summary | |
public FTPFile[] | parseFileList(InputStream listStream, String encoding) Parses an FTP server file listing and converts it into a usable format
in the form of an array of FTPFile instances. | public FTPFile[] | parseFileList(InputStream listStream) Parses an FTP server file listing and converts it into a usable format
in the form of an array of FTPFile instances. | 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. | public 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()(Code) | | The constructor for a FTPFileEntryParserImpl object.
|
parseFileList | public FTPFile[] parseFileList(InputStream listStream, String encoding) throws IOException(Code) | | Parses an FTP server file listing and converts it into a usable format
in the form of an array of FTPFile instances. If the
file list contains no files, null should be
returned, otherwise an array of FTPFile instances
representing the files in the directory is returned.
Parameters: listStream - The InputStream from which the file list should beread. The list of file information contained in the given path. nullif the list could not be obtained or if there are no files inthe directory. exception: java.io.IOException - If an I/O error occurs reading the listStream. |
parseFileList | public FTPFile[] parseFileList(InputStream listStream) throws IOException(Code) | | Parses an FTP server file listing and converts it into a usable format
in the form of an array of FTPFile instances. If the
file list contains no files, null should be
returned, otherwise an array of FTPFile instances
representing the files in the directory is returned.
Parameters: listStream - The InputStream from which the file list should beread. The list of file information contained in the given path. nullif the list could not be obtained or if there are no files inthe directory. exception: java.io.IOException - If an I/O error occurs reading the listStream. |
preParse | public List preParse(List original)(Code) | | 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 is a no-op.
Parameters: original - Original list after it has been created from the server stream original unmodified. |
readNextEntry | public String readNextEntry(BufferedReader reader) throws IOException(Code) | | 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().
Parameters: reader - The BufferedReader object from which entries are to beread. A string representing the next ftp entry or null if none found. exception: java.io.IOException - thrown on any IO Error reading from the reader. |
|
|