Class StreamUtils
java.lang.Object
org.apache.lucene.benchmark.byTask.utils.StreamUtils
Stream utilities.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBuffer size used across the benchmark package -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreaminputStream(Path file) Returns anInputStreamover the requested file.static OutputStreamoutputStream(Path file) Returns anOutputStreamover the requested file, identifying the appropriateOutputStreaminstance similar toinputStream(Path).
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZEBuffer size used across the benchmark package- See Also:
-
-
Constructor Details
-
StreamUtils
public StreamUtils()
-
-
Method Details
-
inputStream
Returns anInputStreamover the requested file. This method attempts to identify the appropriateInputStreaminstance to return based on the file name (e.g., if it ends with .bz2 or .bzip, return a 'bzip'InputStream).- Throws:
IOException
-
outputStream
Returns anOutputStreamover the requested file, identifying the appropriateOutputStreaminstance similar toinputStream(Path).- Throws:
IOException
-