MCPcopy Create free account
hub / github.com/BaseXdb/basex / add

Method add

basex-core/src/main/java/org/basex/util/Num.java:65–72  ·  view source on GitHub ↗

Compresses and adds a value to the specified array and returns the resulting array. @param array input array @param value value to be added @return resulting array (can be the same as input array)

(final byte[] array, final int value)

Source from the content-addressed store, hash-verified

63 * @return resulting array (can be the same as input array)
64 */
65 public static byte[] add(final byte[] array, final int value) {
66 final int len = length(value);
67 final int pos = size(array);
68 final byte[] tmp = check(array, pos, len);
69 set(tmp, value, pos, len);
70 size(tmp, pos + len);
71 return tmp;
72 }
73
74 /**
75 * Decompresses and returns a value from the specified byte array.

Callers 3

addNewIdsMethod · 0.95
addIdsMethod · 0.95
addMethod · 0.95

Calls 4

lengthMethod · 0.95
sizeMethod · 0.95
checkMethod · 0.95
setMethod · 0.95

Tested by

no test coverage detected