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

Method check

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

Resizes the specified array if no space is left. @param a array to be resized @param p current array position @param l length of new entry @return original or new array

(final byte[] a, final int p, final int l)

Source from the content-addressed store, hash-verified

169 * @return original or new array
170 */
171 private static byte[] check(final byte[] a, final int p, final int l) {
172 final int s = a.length;
173 return p + l < s ? a : Arrays.copyOf(a, s + Math.max(l, s >> 3));
174 }
175
176 /**
177 * Compresses and writes an integer value to the specified byte array.

Callers 1

addMethod · 0.95

Calls 2

copyOfMethod · 0.80
maxMethod · 0.45

Tested by

no test coverage detected