Home | History | Annotate | Download | only in bytecode

Lines Matching refs:index

23      * Reads an unsigned 16bit integer at the index.
25 public static int readU16bit(byte[] code, int index) {
26 return ((code[index] & 0xff) << 8) | (code[index + 1] & 0xff);
30 * Reads a signed 16bit integer at the index.
32 public static int readS16bit(byte[] code, int index) {
33 return (code[index] << 8) | (code[index + 1] & 0xff);
37 * Writes a 16bit integer at the index.
39 public static void write16bit(int value, byte[] code, int index) {
40 code[index] = (byte)(value >>> 8);
41 code[index + 1] = (byte)value;
45 * Reads a 32bit integer at the index.
47 public static int read32bit(byte[] code, int index) {
48 return (code[index] << 24) | ((code[index + 1] & 0xff) << 16)
49 | ((code[index + 2] & 0xff) << 8) | (code[index + 3] & 0xff);
53 * Writes a 32bit integer at the index.
55 public static void write32bit(int value, byte[] code, int index) {
56 code[index] = (byte)(value >>> 24);
57 code[index + 1] = (byte)(value >>> 16);
58 code[index + 2] = (byte)(value >>> 8);
59 code[index + 3] = (byte)value;
66 * @param isrc the index into the source byte array.
68 * @param idest the index into the destination byte array.