MCPcopy Create free account
hub / github.com/davidgiven/luje / store

Method store

lib/java/nio/HeapByteBuffer.java:224–237  ·  view source on GitHub ↗
(int index, int value)

Source from the content-addressed store, hash-verified

222 }
223
224 protected final void store(int index, int value) {
225 int baseOffset = offset + index;
226 if (order == Endianness.BIG_ENDIAN) {
227 for (int i = 3; i >= 0; i--) {
228 backingArray[baseOffset + i] = (byte) (value & 0xFF);
229 value = value >> 8;
230 }
231 } else {
232 for (int i = 0; i <= 3; i++) {
233 backingArray[baseOffset + i] = (byte) (value & 0xFF);
234 value = value >> 8;
235 }
236 }
237 }
238
239 protected final void store(int index, long value) {
240 int baseOffset = offset + index;

Callers 3

putIntMethod · 0.80
putLongMethod · 0.80
putShortMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected