|
|||||||||
| Home >> All >> org >> apache >> commons >> net >> [ ftp overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.commons.net.ftp
Class FTPFileIterator

java.lang.Objectorg.apache.commons.net.ftp.FTPFileIterator
Deprecated. This class is deprecated as of version 1.2 and will be removed in version 2.0 - use FTPFileParseEngine instead
- public class FTPFileIterator
- extends java.lang.Object
This class implements a bidirectional iterator over an FTPFileList. Elements may be retrieved one at at time using the hasNext() - next() syntax familiar from Java 2 collections. Alternatively, entries may be receieved as an array of any requested number of entries or all of them.
- Version:
- $Id: FTPFileIterator.java 165675 2005-05-02 20:09:55Z rwinston $
| Field Summary | |
private static int |
DIREMPTY
Deprecated. constant shorthand for the situation where the raw listing has been scanned and found to have no valid entry. |
private static FTPFile[] |
EMPTY
Deprecated. shorthand for an empty return value. |
private int |
firstGoodEntry
Deprecated. number within rawlines of the first valid file entry. |
private int |
itemptr
Deprecated. this iterator's current position within rawlines. |
private FTPFileEntryParser |
parser
Deprecated. the parser to which this iterator delegates its parsing duties |
private java.util.List |
rawlines
Deprecated. a vector of strings, each representing a possibly valid ftp file entry |
private static int |
UNINIT
Deprecated. constant shorthand for the situation where the raw listing has not yet been scanned |
| Constructor Summary | |
(package private) |
FTPFileIterator(FTPFileList rawlist)
Deprecated. "Package-private" constructor. |
(package private) |
FTPFileIterator(FTPFileList rawlist,
FTPFileEntryParser parser)
Deprecated. "Package-private" constructor. |
| Method Summary | |
FTPFile[] |
getFiles()
Deprecated. Returns a list of FTPFile objects for ALL files listed in the server's LIST output. |
private int |
getFirstGoodEntry()
Deprecated. Skips over any introductory lines and stuff in the listing that does not represent files, returning the line number of the first entry that does represent a file. |
FTPFile[] |
getNext(int quantityRequested)
Deprecated. Returns an array of at most quantityRequested FTPFile
objects starting at this iterator's current position within its
associated list. |
FTPFile[] |
getPrevious(int quantityRequested)
Deprecated. Returns an array of at most quantityRequested FTPFile
objects starting at the position preceding this iterator's current
position within its associated list. |
boolean |
hasNext()
Deprecated. Method for determining whether getNext() will successfully return a non-null value. |
boolean |
hasPrevious()
Deprecated. Method for determining whether getPrevious() will successfully return a non-null value. |
private void |
init()
Deprecated. resets iterator to the beginning of the list. |
FTPFile |
next()
Deprecated. Returns a single parsed FTPFile object corresponding to the raw input line at this iterator's current position. |
private FTPFile |
parseFTPEntry(java.lang.String entry)
Deprecated. Delegates to this object's parser member the job of parsing an entry. |
FTPFile |
previous()
Deprecated. 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). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
rawlines
private java.util.List rawlines
- Deprecated.
- a vector of strings, each representing a possibly valid ftp file entry
- a vector of strings, each representing a possibly valid ftp file entry
parser
private FTPFileEntryParser parser
- Deprecated.
- the parser to which this iterator delegates its parsing duties
- the parser to which this iterator delegates its parsing duties
UNINIT
private static final int UNINIT
- Deprecated.
- constant shorthand for the situation where the raw listing has not yet been scanned
- See Also:
- Constant Field Values
- constant shorthand for the situation where the raw listing has not yet been scanned
DIREMPTY
private static final int DIREMPTY
- Deprecated.
- constant shorthand for the situation where the raw listing has been scanned and found to have no valid entry.
- See Also:
- Constant Field Values
- constant shorthand for the situation where the raw listing has been scanned and found to have no valid entry.
itemptr
private int itemptr
- Deprecated.
- this iterator's current position within
rawlines. - this iterator's current position within
firstGoodEntry
private int firstGoodEntry
- Deprecated.
- number within
rawlinesof the first valid file entry. - number within
EMPTY
private static final FTPFile[] EMPTY
- Deprecated.
- shorthand for an empty return value.
- shorthand for an empty return value.
| Constructor Detail |
FTPFileIterator
FTPFileIterator(FTPFileList rawlist)
- Deprecated.
- "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.
- "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.
FTPFileIterator
FTPFileIterator(FTPFileList rawlist, FTPFileEntryParser parser)
- Deprecated.
- "Package-private" constructor. Only the FTPFileList can create an iterator, using it's iterator() method. The list will be iterated with a supplied parser
- "Package-private" constructor. Only the FTPFileList can create an iterator, using it's iterator() method. The list will be iterated with a supplied parser
| Method Detail |
parseFTPEntry
private FTPFile parseFTPEntry(java.lang.String entry)
- Deprecated.
- Delegates to this object's parser member the job of parsing an entry.
- Delegates to this object's parser member the job of parsing an entry.
getFirstGoodEntry
private int getFirstGoodEntry()
- Deprecated.
- Skips over any introductory lines and stuff in the listing that does not represent files, returning the line number of the first entry that does represent a file.
- Skips over any introductory lines and stuff in the listing that does not represent files, returning the line number of the first entry that does represent a file.
init
private void init()
- Deprecated.
- resets iterator to the beginning of the list.
- resets iterator to the beginning of the list.
getFiles
public FTPFile[] getFiles()
- Deprecated.
- Returns a list of FTPFile objects for ALL files listed in the server's LIST output.
- Returns a list of FTPFile objects for ALL files listed in the server's LIST output.
getNext
public FTPFile[] getNext(int quantityRequested)
- Deprecated.
- Returns an array of at most
quantityRequestedFTPFile objects starting at this iterator's current position within its associated list. If fewer thanquantityRequestedsuch 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 eitherquantityRequestedor the number of entries available after the iterator, whichever is fewer. - Returns an array of at most
hasNext
public boolean hasNext()
- Deprecated.
- Method for determining whether getNext() will successfully return a non-null value.
- Method for determining whether getNext() will successfully return a non-null value.
next
public FTPFile next()
- Deprecated.
- 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).
- 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).
getPrevious
public FTPFile[] getPrevious(int quantityRequested)
- Deprecated.
- Returns an array of at most
quantityRequestedFTPFile objects starting at the position preceding this iterator's current position within its associated list. If fewer thanquantityRequestedsuch 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 eitherquantityRequestedor the number of entries available before the current position, whichever is fewer. - Returns an array of at most
hasPrevious
public boolean hasPrevious()
- Deprecated.
- Method for determining whether getPrevious() will successfully return a non-null value.
- Method for determining whether getPrevious() will successfully return a non-null value.
previous
public FTPFile previous()
- Deprecated.
- 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).
- 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).
|
|||||||||
| Home >> All >> org >> apache >> commons >> net >> [ ftp overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.commons.net.ftp.FTPFileIterator