Package org.apache.lucene.store
Class _TestHelper
- java.lang.Object
-
- org.apache.lucene.store._TestHelper
-
public class _TestHelper extends Object
This class provides access to package-level features defined in the store package. It is used for testing only.
-
-
Constructor Summary
Constructors Constructor Description _TestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isSimpleFSIndexInput(org.apache.lucene.store.IndexInput is)
Returns true if the instance of the provided input stream is actually an SimpleFSIndexInput.static boolean
isSimpleFSIndexInputClone(org.apache.lucene.store.IndexInput is)
Returns true if the provided input stream is an SimpleFSIndexInput and is a clone, that is it does not own its underlying file descriptor.static boolean
isSimpleFSIndexInputOpen(org.apache.lucene.store.IndexInput is)
Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns true if the underlying file descriptor is valid, and false otherwise.
-
-
-
Method Detail
-
isSimpleFSIndexInput
public static boolean isSimpleFSIndexInput(org.apache.lucene.store.IndexInput is)
Returns true if the instance of the provided input stream is actually an SimpleFSIndexInput.
-
isSimpleFSIndexInputClone
public static boolean isSimpleFSIndexInputClone(org.apache.lucene.store.IndexInput is)
Returns true if the provided input stream is an SimpleFSIndexInput and is a clone, that is it does not own its underlying file descriptor.
-
isSimpleFSIndexInputOpen
public static boolean isSimpleFSIndexInputOpen(org.apache.lucene.store.IndexInput is) throws IOException
Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns true if the underlying file descriptor is valid, and false otherwise. This can be used to determine if the OS file has been closed. The descriptor becomes invalid when the non-clone instance of the SimpleFSIndexInput that owns this descriptor is closed. However, the descriptor may possibly become invalid in other ways as well.- Throws:
IOException
-
-