Class StreamUtils
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.utils.StreamUtils
-
public class StreamUtils extends Object
Stream utilities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStreamUtils.TypeFile format type
-
Field Summary
Fields Modifier and Type Field Description static intBUFFER_SIZEBuffer size used across the benchmark package
-
Constructor Summary
Constructors Constructor Description StreamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStreaminputStream(Path file)Returns anInputStreamover the requested file.static OutputStreamoutputStream(Path file)Returns anOutputStreamover the requested file, identifying the appropriateOutputStreaminstance similar toinputStream(Path).
-
-
-
Field Detail
-
BUFFER_SIZE
public static final int BUFFER_SIZE
Buffer size used across the benchmark package- See Also:
- Constant Field Values
-
-
Method Detail
-
inputStream
public static InputStream inputStream(Path file) throws IOException
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
public static OutputStream outputStream(Path file) throws IOException
Returns anOutputStreamover the requested file, identifying the appropriateOutputStreaminstance similar toinputStream(Path).- Throws:
IOException
-
-