Methods Summary |
---|
public static org.apache.commons.net.ftp.FTPFileList | create(java.io.InputStream stream, FTPFileEntryParser parser, java.lang.String encoding)The only way to create an FTPFileList object. Invokes
the private constructor and then reads the stream supplied stream to
build the intermediate array of "lines" which will later be parsed
into FTPFile object.
FTPFileList list = new FTPFileList(parser, encoding);
list.readStream(stream, encoding);
parser.preParse(list.lines);
return list;
|
public static org.apache.commons.net.ftp.FTPFileList | create(java.io.InputStream stream, FTPFileEntryParser parser)The only way to create an FTPFileList object. Invokes
the private constructor and then reads the stream supplied stream to
build the intermediate array of "lines" which will later be parsed
into FTPFile object.
return create(stream, parser, null);
|
public FTPFile[] | getFiles()returns an array of FTPFile objects for all the files in the directory
listing
return iterator().getFiles();
|
java.util.List | getLines()Package private accessor for the collection of raw input lines.
return this.lines;
|
FTPFileEntryParser | getParser()Accessor for this object's default parser.
return this.parser;
|
public FTPFileIterator | iterator()create an iterator over this list using the parser with which this list
was initally created
return new FTPFileIterator(this);
|
public FTPFileIterator | iterator(FTPFileEntryParser parser)create an iterator over this list using the supplied parser
return new FTPFileIterator(this, parser);
|
public void | readStream(java.io.InputStream stream, java.lang.String encoding)internal method for reading the input into the lines vector.
BufferedReader reader = new BufferedReader(new InputStreamReader(stream, encoding));
String line = this.parser.readNextEntry(reader);
while (line != null)
{
this.lines.add(line);
line = this.parser.readNextEntry(reader);
}
reader.close();
|
public void | readStream(java.io.InputStream stream)internal method for reading the input into the lines vector.
readStream(stream, null);
|