private static class LogInputFile.LogInputFileIterator extends Object implements Iterator
Iterator
returned by
LogInputStream.logs
. The next
method
occasionally returns null
.next()
Modifier and Type | Field and Description |
---|---|
private LogFile |
baseLogFile |
private Iterator |
fileList |
Constructor and Description |
---|
LogInputFile.LogInputFileIterator(Collection files,
LogFile baseLogFile)
Create a new
LogInputFileIterator object
for the given list. |
LogInputFile.LogInputFileIterator(Collection files, LogFile baseLogFile)
LogInputFileIterator
object
for the given list.public Object 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
.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.