/** * Reads an unsigned leb128p1 integer from {@code in}. */ public static int readUnsignedLeb128p1(ByteInput in) { return readUnsignedLeb128(in) - 1; }
int addrDiff = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, addrDiff); break; int registerNum = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, registerNum); int registerNum = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, registerNum); break;
public int readUleb128() { return Leb128.readUnsignedLeb128(this); }
int addrDiff = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, addrDiff); break; int registerNum = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, registerNum); int registerNum = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, registerNum); break;
public int readUleb128p1() { return Leb128.readUnsignedLeb128(this) - 1; }
int addrDiff = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, addrDiff); break; int registerNum = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, registerNum); int registerNum = Leb128.readUnsignedLeb128(inAdapter); Leb128.writeUnsignedLeb128(outAdapter, registerNum); break;
public int readAnnotationName() { return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the fields of an annotation, returning the number of * fields. The caller must follow up by making alternating calls to {@link * #readAnnotationName()} and another read method. For example, this reads * an annotation whose fields are all bytes: <pre> {@code * int fieldCount = readAnnotation(); * int annotationType = getAnnotationType(); * for (int i = 0; i < fieldCount; i++) { * readAnnotationName(); * readByte(); * } * }</pre> */ public int readAnnotation() { checkType(ENCODED_ANNOTATION); type = MUST_READ; annotationType = Leb128.readUnsignedLeb128(in); return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the elements of an array, returning the array's size. The * caller must follow up by calling a read method for each element in the * array. For example, this reads a byte array: <pre> {@code * int arraySize = readArray(); * for (int i = 0, i < arraySize; i++) { * readByte(); * } * }</pre> */ public int readArray() { checkType(ENCODED_ARRAY); type = MUST_READ; return Leb128.readUnsignedLeb128(in); }
/** * Reads an unsigned leb128p1 integer from {@code in}. */ public static int readUnsignedLeb128p1(ByteInput in) { return readUnsignedLeb128(in) - 1; }
public int readAnnotationName() { return Leb128.readUnsignedLeb128(in); }
public int readUleb128() { return Leb128.readUnsignedLeb128(this); }
public int readUleb128p1() { return Leb128.readUnsignedLeb128(this) - 1; }
/** * Begins reading the fields of an annotation, returning the number of * fields. The caller must follow up by making alternating calls to {@link * #readAnnotationName()} and another read method. For example, this reads * an annotation whose fields are all bytes: <pre> {@code * int fieldCount = readAnnotation(); * int annotationType = getAnnotationType(); * for (int i = 0; i < fieldCount; i++) { * readAnnotationName(); * readByte(); * } * }</pre> */ public int readAnnotation() { checkType(ENCODED_ANNOTATION); type = MUST_READ; annotationType = Leb128.readUnsignedLeb128(in); return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the elements of an array, returning the array's size. The * caller must follow up by calling a read method for each element in the * array. For example, this reads a byte array: <pre> {@code * int arraySize = readArray(); * for (int i = 0, i < arraySize; i++) { * readByte(); * } * }</pre> */ public int readArray() { checkType(ENCODED_ARRAY); type = MUST_READ; return Leb128.readUnsignedLeb128(in); }