Home | History | Annotate | Download | only in dexbacked

Lines Matching refs:offset

45     public BaseDexBuffer(@Nonnull byte[] buf, int offset) {
47 this.baseOffset = offset;
50 public int readSmallUint(int offset) {
52 offset += baseOffset;
53 int result = (buf[offset] & 0xff) |
54 ((buf[offset+1] & 0xff) << 8) |
55 ((buf[offset+2] & 0xff) << 16) |
56 ((buf[offset+3]) << 24);
58 throw new ExceptionWithContext("Encountered small uint that is out of range at offset 0x%x", offset);
63 public int readOptionalUint(int offset) {
65 offset += baseOffset;
66 int result = (buf[offset] & 0xff) |
67 ((buf[offset+1] & 0xff) << 8) |
68 ((buf[offset+2] & 0xff) << 16) |
69 ((buf[offset+3]) << 24);
71 throw new ExceptionWithContext("Encountered optional uint that is out of range at offset 0x%x", offset);
76 public int readUshort(int offset) {
78 offset += baseOffset;
79 return (buf[offset] & 0xff) |
80 ((buf[offset+1] & 0xff) << 8);
83 public int readUbyte(int offset) {
84 return buf[offset + baseOffset] & 0xff;
87 public long readLong(int offset) {
89 offset += baseOffset;
90 return (buf[offset] & 0xff) |
91 ((buf[offset+1] & 0xff) << 8) |
92 ((buf[offset+2] & 0xff) << 16) |
93 ((buf[offset+3] & 0xffL) << 24) |
94 ((buf[offset+4] & 0xffL) << 32) |
95 ((buf[offset+5] & 0xffL) << 40) |
96 ((buf[offset+6] & 0xffL) << 48) |
97 (((long)buf[offset+7]) << 56);
100 public int readLongAsSmallUint(int offset) {
102 offset += baseOffset;
103 long result = (buf[offset] & 0xff) |
104 ((buf[offset+1] & 0xff) << 8) |
105 ((buf[offset+2] & 0xff) << 16) |
106 ((buf[offset+3] & 0xffL) << 24) |
107 ((buf[offset+4] & 0xffL) << 32) |
108 ((buf[offset+5] & 0xffL) << 40) |
109 ((buf[offset+6] & 0xffL) << 48) |
110 (((long)buf[offset+7]) << 56);
112 throw new ExceptionWithContext("Encountered out-of-range ulong at offset 0x%x", offset);
117 public int readInt(int offset) {
119 offset += baseOffset;
120 return (buf[offset] & 0xff) |
121 ((buf[offset+1] & 0xff) << 8) |
122 ((buf[offset+2] & 0xff) << 16) |
123 (buf[offset+3] << 24);
126 public int readShort(int offset) {
128 offset += baseOffset;
129 return (buf[offset] & 0xff) |
130 (buf[offset+1] << 8);
133 public int readByte(int offset) {
134 return buf[baseOffset + offset];
138 public BaseDexReader readerAt(int offset) {
139 return new BaseDexReader<BaseDexBuffer>(this, offset);