newBytesRef

Creates a BytesRef holding UTF-8 bytes for the incoming String, that sometimes uses a non-zero offset, and non-zero end-padding, to tickle latent bugs that fail to look at BytesRef.offset.


Creates a copy of the incoming BytesRef that sometimes uses a non-zero offset, and non-zero end-padding, to tickle latent bugs that fail to look at BytesRef.offset.


Creates a random BytesRef from the incoming bytes that sometimes uses a non-zero offset, and non-zero end-padding, to tickle latent bugs that fail to look at BytesRef.offset.


Creates a random empty BytesRef that sometimes uses a non-zero offset, and non-zero end-padding, to tickle latent bugs that fail to look at BytesRef.offset.


fun newBytesRef(byteLength: Int): BytesRef

Creates a random empty BytesRef, with at least the requested length of bytes free, that sometimes uses a non-zero offset, and non-zero end-padding, to tickle latent bugs that fail to look at BytesRef.offset.


fun newBytesRef(bytesIn: ByteArray, offset: Int, length: Int): BytesRef

Creates a copy of the incoming bytes slice that sometimes uses a non-zero offset, and non-zero end-padding, to tickle latent bugs that fail to look at BytesRef.offset.