Class 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 Detail

      • slice

        private byte[] slice
      • upto

        private int upto
      • offset0

        int offset0
    • Constructor Detail

      • ByteSliceWriter

        public ByteSliceWriter​(ByteBlockPool pool)
    • Method Detail

      • init

        public void init​(int address)
        Set up the writer to write at address.
      • 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:
        DataInput.readBytes(byte[],int,int)
      • getAddress

        public int getAddress()