MCPcopy Create free account
hub / github.com/Youlor/unpacker / codeUnit

Method codeUnit

dexfixer/src/com/android/dx/dex/code/InsnFormat.java:478–488  ·  view source on GitHub ↗

Helper method to combine two bytes into a code unit. @param low 0..255; low byte @param high 0..255; high byte @return combined value

(int low, int high)

Source from the content-addressed store, hash-verified

476 * @return combined value
477 */
478 protected static short codeUnit(int low, int high) {
479 if ((low & 0xff) != low) {
480 throw new IllegalArgumentException("low out of range 0..255");
481 }
482
483 if ((high & 0xff) != high) {
484 throw new IllegalArgumentException("high out of range 0..255");
485 }
486
487 return (short) (low | (high << 8));
488 }
489
490 /**
491 * Helper method to combine four nibbles into a code unit.

Callers 5

writeToMethod · 0.95
writeToMethod · 0.45
writeToMethod · 0.45
writeToMethod · 0.45
writeToMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected