void (@NotNull ByteBuffer buffer, int offsetInBuffer, int remainsToPad) { if (remainsToPad < RECORD_HEADER_SIZE) { throw new IllegalArgumentException( "Can't create PaddingRecord for " + remainsToPad + "b leftover, must be >" + RECORD_HEADER_SIZE + " b left:" + "buffer.capacity(=" + buffer.capacity() + "), offsetInBuffer(=" + offsetInBuffer + ")"); } int header = paddingRecordHeader(remainsToPad, /*commited: */true); INT32_OVER_BYTE_BUFFER.setVolatile(buffer, offsetInBuffer + HEADER_OFFSET, header); }