@Override public BlockBuilder writeInt(int value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeInt(value); currentEntrySize += SIZE_OF_INT; return this; }
@Override public BlockBuilder writeBytes(Slice source, int sourceIndex, int length) { if (!initialized) { initializeCapacity(); } sliceOutput.writeBytes(source, sourceIndex, length); currentEntrySize += length; return this; }
@Override public BlockBuilder writeShort(int value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeShort(value); currentEntrySize += SIZE_OF_SHORT; return this; }
@Override public BlockBuilder writeLong(long value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeLong(value); currentEntrySize += SIZE_OF_LONG; return this; }
@Override public BlockBuilder writeByte(int value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeByte(value); currentEntrySize += SIZE_OF_BYTE; return this; }
private void entryAdded(int bytesWritten, boolean isNull) { if (!initialized) { initializeCapacity(); } if (valueIsNull.length <= positions) { growCapacity(); } valueIsNull[positions] = isNull; offsets[positions + 1] = sliceOutput.size(); positions++; if (blockBuilderStatus != null) { blockBuilderStatus.addBytes(SIZE_OF_BYTE + SIZE_OF_INT + bytesWritten); } }
@Override public BlockBuilder writeBytes(Slice source, int sourceIndex, int length) { if (!initialized) { initializeCapacity(); } sliceOutput.writeBytes(source, sourceIndex, length); currentEntrySize += length; return this; }
@Override public BlockBuilder writeLong(long value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeLong(value); currentEntrySize += SIZE_OF_LONG; return this; }
@Override public BlockBuilder writeByte(int value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeByte(value); currentEntrySize += SIZE_OF_BYTE; return this; }
@Override public BlockBuilder writeShort(int value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeShort(value); currentEntrySize += SIZE_OF_SHORT; return this; }
@Override public BlockBuilder writeInt(int value) { if (!initialized) { initializeCapacity(); } sliceOutput.writeInt(value); currentEntrySize += SIZE_OF_INT; return this; }
private void entryAdded(int bytesWritten, boolean isNull) { if (!initialized) { initializeCapacity(); } if (valueIsNull.length <= positions) { growCapacity(); } valueIsNull[positions] = isNull; offsets[positions + 1] = sliceOutput.size(); positions++; if (blockBuilderStatus != null) { blockBuilderStatus.addBytes(SIZE_OF_BYTE + SIZE_OF_INT + bytesWritten); } }