Home | History | Annotate | Download | only in raw

Lines Matching refs:buf

55      * @param buf A byte array containing at least the first 8 bytes of an odex file
59 public static boolean verifyMagic(byte[] buf, int offset) {
60 if (buf.length - offset < 8) {
65 if (buf[offset + i] != MAGIC_VALUE[i]) {
70 if (buf[offset + i] < '0' ||
71 buf[offset + i] > '9') {
75 if (buf[offset + 7] != MAGIC_VALUE[7]) {
85 * @param buf A byte array containing at least the first 7 bytes of an odex file
89 public static int getVersion(byte[] buf, int offset) {
90 if (!verifyMagic(buf, offset)) {
94 return getVersionUnchecked(buf, offset);
97 private static int getVersionUnchecked(byte[] buf, int offset) {
98 int version = (buf[offset + 4] - '0') * 100;
99 version += (buf[offset + 5] - '0') * 10;
100 version += buf[offset + 6] - '0';
114 public static int getDexOffset(byte[] buf) {
115 BaseDexBuffer bdb = new BaseDexBuffer(buf);
119 public static int getDependenciesOffset(byte[] buf) {
120 BaseDexBuffer bdb = new BaseDexBuffer(buf);