Class TokenStreams
- java.lang.Object
-
- cool.solr.search.solr.util.analyzing.TokenStreams
-
public class TokenStreams extends Object
This class is superseeded by the open source version in solr-analyzers.
-
-
Constructor Summary
Constructors Constructor Description TokenStreams()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseQuietly(Closeable closeable)Unconditionally close aCloseable.static voidendQuietly(org.apache.lucene.analysis.TokenStream tokenStream)End streams quietly.
-
-
-
Method Detail
-
endQuietly
public static void endQuietly(org.apache.lucene.analysis.TokenStream tokenStream)
End streams quietly. Without throwing anyIOException.- Parameters:
tokenStream-TokenStreamto be closed.
-
closeQuietly
public static void closeQuietly(Closeable closeable)
Unconditionally close aCloseable.Equivalent to
Closeable.close(), except any exceptions will be ignored. This is typically used in finally blocks.Example code:
Closeable closeable = null; try { closeable = new FileReader("foo.txt"); // process closeable closeable.close(); } catch (Exception e) { // error handling } finally { IOUtils.closeQuietly(closeable); }- Parameters:
closeable- the object to close, may be null or already closed- Since:
- 2.0
-
-