Class StreamUtils
java.lang.Object
org.apache.lucene.benchmark.byTask.utils.StreamUtils
Stream utilities.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Buffer size used across the benchmark package -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
inputStream
(Path file) Returns anInputStream
over the requested file.static OutputStream
outputStream
(Path file) Returns anOutputStream
over the requested file, identifying the appropriateOutputStream
instance 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 anInputStream
over the requested file. This method attempts to identify the appropriateInputStream
instance to return based on the file name (e.g., if it ends with .bz2 or .bzip, return a 'bzip'InputStream
).- Throws:
IOException
-
outputStream
Returns anOutputStream
over the requested file, identifying the appropriateOutputStream
instance similar toinputStream(Path)
.- Throws:
IOException
-