org.apache.lucene.benchmark.byTask.utils

## 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 and Description
    --- | ---
    `static class` | `StreamUtils.Type` File format type

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BUFFER_SIZE` Buffer size used across the benchmark package

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InputStream` | `inputStream(Path file)` Returns an `InputStream` over the requested file.
    `static OutputStream` | `outputStream(Path file)` Returns an `OutputStream` over the requested file, identifying the appropriate `OutputStream` instance similar to `inputStream(Path)`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BUFFER_SIZE

          public static final int BUFFER_SIZE

      Buffer size used across the benchmark package
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StreamUtils

          public StreamUtils()

  - ### Method Detail

    - #### inputStream

          public static InputStream inputStream(Path file)
                                         throws IOException

      Returns an `InputStream` over the requested file. This method attempts to identify the appropriate `InputStream` instance 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 an `OutputStream` over the requested file, identifying the appropriate `OutputStream` instance similar to `inputStream(Path)`.
      Throws:
        `IOException`

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.