public final void write(UnsafeArrayData array) { // Unsafe arrays both can be written as a regular array field or as part of a map. This makes // updating the offset and size dependent on the code path, this is why we currently do not // provide an method for writing unsafe arrays that also updates the size and offset. int numBytes = array.getSizeInBytes(); grow(numBytes); Platform.copyMemory( array.getBaseObject(), array.getBaseOffset(), getBuffer(), cursor(), numBytes); increaseCursor(numBytes); }
public final void write(UnsafeArrayData array) { // Unsafe arrays both can be written as a regular array field or as part of a map. This makes // updating the offset and size dependent on the code path, this is why we currently do not // provide an method for writing unsafe arrays that also updates the size and offset. int numBytes = array.getSizeInBytes(); grow(numBytes); Platform.copyMemory( array.getBaseObject(), array.getBaseOffset(), getBuffer(), cursor(), numBytes); increaseCursor(numBytes); }