Package org.apache.lucene.tests.mockfile
Class FilterDirectoryStream
- java.lang.Object
-
- org.apache.lucene.tests.mockfile.FilterDirectoryStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Path>,DirectoryStream<Path>
public class FilterDirectoryStream extends Object implements DirectoryStream<Path>
AFilterDirectoryStreamcontains anotherDirectoryStream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.nio.file.DirectoryStream
DirectoryStream.Filter<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectoryStream<Path>delegateThe underlyingDirectoryStreaminstance.protected FilterFileSystemfileSystemThe underlyingFileSysteminstance.
-
Constructor Summary
Constructors Constructor Description FilterDirectoryStream(DirectoryStream<Path> delegate, FilterFileSystem fileSystem)Construct aFilterDirectoryStreambased on the specified base stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Iterator<Path>iterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
delegate
protected final DirectoryStream<Path> delegate
The underlyingDirectoryStreaminstance.
-
fileSystem
protected final FilterFileSystem fileSystem
The underlyingFileSysteminstance.
-
-
Constructor Detail
-
FilterDirectoryStream
public FilterDirectoryStream(DirectoryStream<Path> delegate, FilterFileSystem fileSystem)
Construct aFilterDirectoryStreambased on the specified base stream.Note that base stream is closed if this stream is closed.
- Parameters:
delegate- specified base stream.
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-