Class ByteSliceWriter

java.lang.Object
org.apache.lucene.store.DataOutput
org.apache.lucene.index.ByteSliceWriter

final class ByteSliceWriter extends DataOutput
Class to write byte streams into slices of shared byte[]. This is used by DocumentsWriter to hold the posting list for many terms in RAM.
  • Field Details

    • BYTE_BLOCK_NOT_MASK

      private static final int BYTE_BLOCK_NOT_MASK
      See Also:
    • slice

      private byte[] slice
    • upto

      private int upto
    • pool

      private final ByteBlockPool pool
    • offset0

      int offset0
  • Constructor Details

  • Method Details

    • init

      public void init(int address)
      Set up the writer to write at address.
    • writeByte

      public void writeByte(byte b)
      Write byte into byte slice stream
      Specified by:
      writeByte in class DataOutput
      See Also:
    • writeBytes

      public void writeBytes(byte[] b, int offset, int len)
      Description copied from class: DataOutput
      Writes an array of bytes.
      Specified by:
      writeBytes in class DataOutput
      Parameters:
      b - the bytes to write
      offset - the offset in the byte array
      len - the number of bytes to write
      See Also:
    • getAddress

      public int getAddress()