All Packages Class Hierarchy This Package Previous Next Index
Class com.oroinc.net.ftp.DefaultFTPFileListParser
java.lang.Object
|
+----com.oroinc.net.ftp.DefaultFTPFileListParser
- public final class DefaultFTPFileListParser
- extends Object
- implements FTPFileListParser
DefaultFTPFileListParser is the default implementation of
FTPFileListParser
used by FTPClient
to parse file listings.
Sometimes you will want to parse unusual listing formats, in which
case you would create your own implementation of FTPFileListParser and
if necessary, subclass FTPFile.
Copyright © 1997 Original Reusable Objects, Inc.
All rights reserved.
- See Also:
- FTPFileListParser, FTPFile, listFiles
-
DefaultFTPFileListParser()
-
-
parseFileList(InputStream)
- Parses an FTP server file listing and converts it into a usable format
in the form of an array of
FTPFile
instances.
-
parseFTPEntry(String)
- Parses an FTP server listing entry (a single line) and returns an
FTPFile instance with the resulting information.
DefaultFTPFileListParser
public DefaultFTPFileListParser()
parseFTPEntry
public FTPFile parseFTPEntry(String entry)
- Parses an FTP server listing entry (a single line) and returns an
FTPFile instance with the resulting information. If the entry could
not be parsed, returns null.
- Parameters:
- entry - A single line of an FTP server listing with the
end of line truncated.
- Returns:
- An FTPFile instance representing the file information. null if
the entry could be parsed, returns null.
parseFileList
public FTPFile[] parseFileList(InputStream listStream) throws IOException
- 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
is 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 be
read.
- Returns:
- The list of file information contained in the given path. null
if the list could not be obtained or if there are no files in
the directory.
- Throws: IOException
- If an I/O error occurs reading the listStream.
All Packages Class Hierarchy This Package Previous Next Index