|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.net.ftp.DefaultFTPFileListParser
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.
FTPFileListParser
,
FTPFile
,
FTPClient.listFiles(org.apache.commons.net.ftp.FTPFileListParser, java.lang.String)
Constructor Summary | |
DefaultFTPFileListParser()
|
Method Summary | |
private int |
__charArrayToInt(char[] arr,
int start,
int end)
|
private long |
__charArrayToLong(char[] arr,
int start,
int end)
|
private int |
__skipDigits(char[] cToken,
int start)
|
private int |
__skipNonWhitespace(char[] cToken,
int start)
|
private int |
__skipNonWhitespaceToLower(char[] cToken,
int start)
|
private int |
__skipWhitespace(char[] cToken,
int start)
|
FTPFile[] |
parseFileList(java.io.InputStream listStream)
Parses an FTP server file listing and converts it into a usable format in the form of an array of FTPFile instances. |
FTPFile |
parseFTPEntry(java.lang.String entry)
Parses an FTP server listing entry (a single line) and returns an FTPFile instance with the resulting information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultFTPFileListParser()
Method Detail |
private int __charArrayToInt(char[] arr, int start, int end)
private long __charArrayToLong(char[] arr, int start, int end)
private int __skipWhitespace(char[] cToken, int start)
private int __skipDigits(char[] cToken, int start)
private int __skipNonWhitespace(char[] cToken, int start)
private int __skipNonWhitespaceToLower(char[] cToken, int start)
public FTPFile parseFTPEntry(java.lang.String entry)
entry
- A single line of an FTP server listing with the
end of line truncated.
public FTPFile[] parseFileList(java.io.InputStream listStream) throws java.io.IOException
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.
parseFileList
in interface FTPFileListParser
listStream
- The InputStream from which the file list should be
read.
java.io.IOException
- If an I/O error occurs reading the listStream.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |