com.sun.jini.outrigger.snaplogstore
Class LogInputFile.LogInputFileIterator

java.lang.Object
  extended by com.sun.jini.outrigger.snaplogstore.LogInputFile.LogInputFileIterator
All Implemented Interfaces:
Iterator
Enclosing class:
LogInputFile

private static class LogInputFile.LogInputFileIterator
extends Object
implements Iterator

The implementation of Iterator returned by LogInputStream.logs. The next method occasionally returns null.

See Also:
next()

Field Summary
private  LogFile baseLogFile
           
private  Iterator fileList
           
 
Constructor Summary
LogInputFile.LogInputFileIterator(Collection files, LogFile baseLogFile)
          Create a new LogInputFileIterator object for the given list.
 
Method Summary
 boolean hasNext()
           
 Object next()
          Return the next File object, or null.
 void remove()
          Remove the File object returned by the iterator from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseLogFile

private LogFile baseLogFile

fileList

private Iterator fileList
Constructor Detail

LogInputFile.LogInputFileIterator

LogInputFile.LogInputFileIterator(Collection files,
                                  LogFile baseLogFile)
Create a new LogInputFileIterator object for the given list.

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Return the next File object, or null. You will get null when the file existed at the time of listing, but no longer exists when the iterator gets to it. For example, if a process is consuming all completed logs, the listing might find a log, but that process may have consumed and removed it by the time you invoke next, so you will get a null.

Specified by:
next in interface Iterator

remove

public void remove()
Remove the File object returned by the iterator from the list. This does not remove the file itself.

Specified by:
remove in interface Iterator


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.