| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.commons.net.ftp.FTPFileListpublic class FTPFileListextends java.lang.Object(FTPClient.listFiles() methods did,
which required a bigger memory hit.
org.apache.commons.net.ftp.FTPClient.createFileList, FTPFileIterator, FTPFileEntryParser, FTPListParseEngineMethod Summary | |
static FTPFileList |
|
static FTPFileList |
|
FTPFile[] |
|
FTPFileIterator |
|
FTPFileIterator |
|
void |
|
void |
|
public static FTPFileList create(InputStream stream, FTPFileEntryParser parser) throws IOException
Deprecated. The version of this method which takes an encoding should be used.
The only way to create anFTPFileListobject. Invokes the private constructor and then reads the stream supplied stream to build the intermediate array of "lines" which will later be parsed intoFTPFileobject.
- Parameters:
stream- The input stream created by reading the socket on which the output of the LIST command was returnedparser- the defaultFTPFileEntryParserto be used by this object. This may later be changed using the init() method.
- Returns:
- the
FTPFileListcreated, with an initialized of unparsed lines of output. Will be null if the listing cannot be read from the stream.
public static FTPFileList create(InputStream stream, FTPFileEntryParser parser, String encoding) throws IOException
The only way to create anFTPFileListobject. Invokes the private constructor and then reads the stream supplied stream to build the intermediate array of "lines" which will later be parsed intoFTPFileobject.
- Parameters:
stream- The input stream created by reading the socket on which the output of the LIST command was returnedparser- the defaultFTPFileEntryParserto be used by this object. This may later be changed using the init() method.encoding- The encoding to use
- Returns:
- the
FTPFileListcreated, with an initialized of unparsed lines of output. Will be null if the listing cannot be read from the stream.
public FTPFile[] getFiles()
returns an array of FTPFile objects for all the files in the directory listing
- Returns:
- an array of FTPFile objects for all the files in the directory listinge
public FTPFileIterator iterator()
create an iterator over this list using the parser with which this list was initally created
- Returns:
- an iterator over this list using the list's default parser.
public FTPFileIterator iterator(FTPFileEntryParser parser)
create an iterator over this list using the supplied parser
- Parameters:
parser- The user-supplied parser with which the list is to be iterated, may be different from this list's default parser.
- Returns:
- an iterator over this list using the supplied parser.
public void readStream(InputStream stream)
throws IOExceptionDeprecated. The version of this method which takes an encoding should be used.
internal method for reading the input into thelinesvector.
- Parameters:
stream- The socket stream on which the input will be read.
public void readStream(InputStream stream,
String encoding)
throws IOExceptioninternal method for reading the input into thelinesvector.
- Parameters:
stream- The socket stream on which the input will be read.encoding- The encoding to use.