public interface FileList extends OsidList
Like all OsidLists,
FileList
provides a
means for accessing File
elements sequentially either one
at a time or many at a time. Examples:
while (fl.hasNext()) { File file = fl.getNextFile(); }or
while (fl.hasNext()) { File[] files = fl.getNextFiles(fl.available()); }
Modifier and Type | Method and Description |
---|---|
File |
getNextFile()
Gets the next
File in this list. |
File[] |
getNextFiles(long n)
Gets the next set of
File elements in this list which
must be less than or equal to the number returned from
available(). |
File getNextFile() throws OperationFailedException
File
in this list. File
in this list. The
hasNext()
method should be used to test that a next
File
is available before calling this method.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented. File[] getNextFiles(long n) throws OperationFailedException
File
elements in this list which
must be less than or equal to the number returned from
available().
n
- the number of File
elements requested which
should be less than or equal to available()
File
elements.
The
length of the array is less than or equal to the number
specified.IllegalStateException
- no more elements available in
this listOperationFailedException
- unable to complete requestmandatory
- This method must be implemented.