public class FilterDirectoryStream
extends java.lang.Object
implements java.nio.file.DirectoryStream<java.nio.file.Path>
FilterDirectoryStream
contains another
DirectoryStream
, which it uses as its basic
source of data, possibly transforming the data along the
way or providing additional functionality.Modifier and Type | Field and Description |
---|---|
protected java.nio.file.DirectoryStream<java.nio.file.Path> |
delegate
The underlying
DirectoryStream instance. |
protected java.nio.file.FileSystem |
fileSystem
The underlying
FileSystem instance. |
Constructor and Description |
---|
FilterDirectoryStream(java.nio.file.DirectoryStream<java.nio.file.Path> delegate,
java.nio.file.FileSystem fileSystem)
Construct a
FilterDirectoryStream based on
the specified base stream. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.Iterator<java.nio.file.Path> |
iterator() |
protected final java.nio.file.DirectoryStream<java.nio.file.Path> delegate
DirectoryStream
instance.protected final java.nio.file.FileSystem fileSystem
FileSystem
instance.public FilterDirectoryStream(java.nio.file.DirectoryStream<java.nio.file.Path> delegate, java.nio.file.FileSystem fileSystem)
FilterDirectoryStream
based on
the specified base stream.
Note that base stream is closed if this stream is closed.
delegate
- specified base stream.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public java.util.Iterator<java.nio.file.Path> iterator()
iterator
in interface java.lang.Iterable<java.nio.file.Path>
iterator
in interface java.nio.file.DirectoryStream<java.nio.file.Path>
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.