Class OutputStreamIndexOutput

All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
FSDirectory.FSIndexOutput

public class OutputStreamIndexOutput extends IndexOutput
Implementation class for buffered IndexOutput that writes to an OutputStream.
  • Field Details

    • crc

      private final CRC32 crc
    • os

      private final BufferedOutputStream os
    • bytesWritten

      private long bytesWritten
    • flushedOnClose

      private boolean flushedOnClose
  • Constructor Details

    • OutputStreamIndexOutput

      public OutputStreamIndexOutput(String resourceDescription, String name, OutputStream out, int bufferSize)
      Creates a new OutputStreamIndexOutput with the given buffer size.
      Parameters:
      bufferSize - the buffer size in bytes used to buffer writes internally.
      Throws:
      IllegalArgumentException - if the given buffer size is less or equal to 0
  • Method Details