Package org.apache.commons.net.ftp
Interface FTPFileListParser
-
- All Known Implementing Classes:
CompositeFileEntryParser,ConfigurableFTPFileEntryParserImpl,DefaultFTPFileListParser,EnterpriseUnixFTPEntryParser,FTPFileEntryParserImpl,FTPFileListParserImpl,MVSFTPEntryParser,NTFTPEntryParser,OS2FTPEntryParser,OS400FTPEntryParser,RegexFTPFileEntryParserImpl,UnixFTPEntryParser,VMSFTPEntryParser,VMSVersioningFTPEntryParser
public interface FTPFileListParserDeprecated.This interface is deprecated as of version 1.2 and will be removed in version 2.0 -- use FTPFileEntryParser instead.FTPFileListParser defines the interface for parsing FTP file listings and converting that information into an array ofFTPFileinstances. 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.- Author:
- Daniel F. Savarese
- See Also:
FTPFile,FTPClient.listFiles(java.lang.String, java.lang.String)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description FTPFile[]parseFileList(java.io.InputStream listStream)Deprecated.Parses an FTP server file listing and converts it into a usable format in the form of an array ofFTPFileinstances.FTPFile[]parseFileList(java.io.InputStream listStream, java.lang.String encoding)Deprecated.Parses an FTP server file listing and converts it into a usable format in the form of an array ofFTPFileinstances.
-
-
-
Method Detail
-
parseFileList
FTPFile[] parseFileList(java.io.InputStream listStream, java.lang.String encoding) throws java.io.IOException
Deprecated.Parses an FTP server file listing and converts it into a usable format in the form of an array ofFTPFileinstances. If the file list contains no files,nullshould be returned, otherwise an array ofFTPFileinstances representing the files in the directory is returned.- Parameters:
listStream- The InputStream from which the file list should be read.encoding- The encoding to use.- 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:
java.io.IOException- If an I/O error occurs reading the listStream.
-
parseFileList
FTPFile[] parseFileList(java.io.InputStream listStream) throws java.io.IOException
Deprecated.Parses an FTP server file listing and converts it into a usable format in the form of an array ofFTPFileinstances. If the file list contains no files,nullshould be returned, otherwise an array ofFTPFileinstances 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:
java.io.IOException- If an I/O error occurs reading the listStream.
-
-