| |
|
| java.lang.Object org.apache.commons.net.ftp.FTPFileIterator
Method Summary | |
public FTPFile[] | getFiles() Returns a list of FTPFile objects for ALL files listed in the server's
LIST output. | public FTPFile[] | getNext(int quantityRequested) Returns an array of at most quantityRequested FTPFile
objects starting at this iterator's current position within its
associated list. | public FTPFile[] | getPrevious(int quantityRequested) Returns an array of at most quantityRequested FTPFile
objects starting at the position preceding this iterator's current
position within its associated list. | public boolean | hasNext() Method for determining whether getNext() will successfully return a
non-null value. | public boolean | hasPrevious() Method for determining whether getPrevious() will successfully return a
non-null value. | public FTPFile | next() Returns a single parsed FTPFile object corresponding to the raw input
line at this iterator's current position. | public FTPFile | previous() Returns a single parsed FTPFile object corresponding to the raw input
line at the position preceding that of the internal iterator over
the list of raw lines maintained by this object
After this method is called the internal iterator is retreated by one
element (unless it is already at beginning of list). |
FTPFileIterator | FTPFileIterator(FTPFileList rawlist)(Code) | | "Package-private" constructor. Only the FTPFileList can
create an iterator, using it's iterator() method. The list
will be iterated with the list's default parser.
Parameters: rawlist - the FTPFileList to be iterated |
FTPFileIterator | FTPFileIterator(FTPFileList rawlist, FTPFileEntryParser parser)(Code) | | "Package-private" constructor. Only the FTPFileList can
create an iterator, using it's iterator() method. The list will be
iterated with a supplied parser
Parameters: rawlist - the FTPFileList to be iterated Parameters: parser - the system specific parser for raw FTP entries. |
getFiles | public FTPFile[] getFiles()(Code) | | Returns a list of FTPFile objects for ALL files listed in the server's
LIST output.
a list of FTPFile objects for ALL files listed in the server'sLIST output. |
getNext | public FTPFile[] getNext(int quantityRequested)(Code) | | Returns an array of at most quantityRequested FTPFile
objects starting at this iterator's current position within its
associated list. If fewer than quantityRequested such
elements are available, the returned array will have a length equal
to the number of entries at and after after the current position.
If no such entries are found, this array will have a length of 0.
After this method is called the current position is advanced by
either quantityRequested or the number of entries
available after the iterator, whichever is fewer.
Parameters: quantityRequested - the maximum number of entries we want to get. A 0passed here is a signal to get ALL the entries. an array of at most quantityRequested FTPFileobjects starting at the current position of this iterator within itslist and at least the number of elements which exist in the list atand after its current position. |
getPrevious | public FTPFile[] getPrevious(int quantityRequested)(Code) | | Returns an array of at most quantityRequested FTPFile
objects starting at the position preceding this iterator's current
position within its associated list. If fewer than
quantityRequested such elements are available, the
returned array will have a length equal to the number of entries after
the iterator. If no such entries are found, this array will have a
length of 0. The entries will be ordered in the same order as the
list, not reversed.
After this method is called the current position is moved back by
either quantityRequested or the number of entries
available before the current position, whichever is fewer.
Parameters: quantityRequested - the maximum number of entries we want to get.A 0 passed here is a signal to get ALL the entries. an array of at most quantityRequested FTPFileobjects starting at the position preceding the current position ofthis iterator within its list and at least the number of elements whichexist in the list prior to its current position. |
hasNext | public boolean hasNext()(Code) | | Method for determining whether getNext() will successfully return a
non-null value.
true if there exist any files after the one currently pointedto by the internal iterator, false otherwise. |
hasPrevious | public boolean hasPrevious()(Code) | | Method for determining whether getPrevious() will successfully return a
non-null value.
true if there exist any files before the one currently pointedto by the internal iterator, false otherwise. |
next | public FTPFile next()(Code) | | Returns a single parsed FTPFile object corresponding to the raw input
line at this iterator's current position.
After this method is called the internal iterator is advanced by one
element (unless already at end of list).
a single FTPFile object corresponding to the raw input lineat the position of the internal iterator over the list of raw inputlines maintained by this object or null if no such object exists. |
previous | public FTPFile previous()(Code) | | Returns a single parsed FTPFile object corresponding to the raw input
line at the position preceding that of the internal iterator over
the list of raw lines maintained by this object
After this method is called the internal iterator is retreated by one
element (unless it is already at beginning of list).
a single FTPFile object corresponding to the raw input lineat the position immediately preceding that of the internal iteratorover the list of raw input lines maintained by this object. |
|
|
|