class LocalDirectoryStream extends java.lang.Object implements DirectoryStream<Path>, java.util.Iterator<Path>
DirectoryStream
for local directories.DirectoryStream.Filter
Modifier and Type | Field and Description |
---|---|
private Path |
dir
The directory to produce a stream for.
|
private DirectoryStream.Filter |
filter
The filter to use.
|
private java.util.Iterator<java.nio.file.Path> |
iterator
The Iterator from the underlying java.nio implementation.
|
private Path |
readAhead
A buffer to read ahead.
|
private java.nio.file.DirectoryStream<java.nio.file.Path> |
stream
The DirectoryStream from the underlying java.nio implementation
|
Constructor and Description |
---|
LocalDirectoryStream(Path dir,
DirectoryStream.Filter filter) |
private final java.nio.file.DirectoryStream<java.nio.file.Path> stream
private final java.util.Iterator<java.nio.file.Path> iterator
private final DirectoryStream.Filter filter
private final Path dir
private Path readAhead
LocalDirectoryStream(Path dir, DirectoryStream.Filter filter) throws XenonException
XenonException
private Path getPath(java.nio.file.Path path)
public java.util.Iterator<Path> iterator()
iterator
in interface java.lang.Iterable<Path>
iterator
in interface DirectoryStream<Path>
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface DirectoryStream<Path>
java.io.IOException
public boolean hasNext()
hasNext
in interface java.util.Iterator<Path>
public void remove()
remove
in interface java.util.Iterator<Path>