public class FilterDirectoryStream extends Object implements DirectoryStream<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.DirectoryStream.Filter<T>
Modifier and Type | Field and Description |
---|---|
protected DirectoryStream<Path> |
delegate
The underlying
DirectoryStream instance. |
protected FileSystem |
fileSystem
The underlying
FileSystem instance. |
Constructor and Description |
---|
FilterDirectoryStream(DirectoryStream<Path> delegate,
FileSystem fileSystem)
Construct a
FilterDirectoryStream based on
the specified base stream. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Iterator<Path> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected final DirectoryStream<Path> delegate
DirectoryStream
instance.protected final FileSystem fileSystem
FileSystem
instance.public FilterDirectoryStream(DirectoryStream<Path> delegate, 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 IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.