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

Method hex

basex-core/src/main/java/org/basex/util/Token.java:1437–1443  ·  view source on GitHub ↗

Returns a hex representation of the specified value. @param value value @param length length of hex output @return hex representation

(final int value, final int length)

Source from the content-addressed store, hash-verified

1435 * @return hex representation
1436 */
1437 public static byte[] hex(final int value, final int length) {
1438 final byte[] tmp = new byte[length];
1439 for(int l = 0; l < length; l++) {
1440 tmp[length - l - 1] = HEX_TABLE[value >> (l << 2) & 0xF];
1441 }
1442 return tmp;
1443 }
1444
1445 /**
1446 * Returns a hex representation of the specified byte array.

Callers 8

stringMethod · 0.95
toStringMethod · 0.95
encodeUriMethod · 0.95
hashMethod · 0.95
escapeMethod · 0.45
JsonSerializerClass · 0.45
addMethod · 0.45
hmacMethod · 0.45

Calls 1

checkCapacityMethod · 0.95

Tested by

no test coverage detected