Rename DexReader.skipBytes to moveRelative, and add setOffset

This commit is contained in:
Ben Gruver 2012-10-26 00:06:08 -07:00
parent 2e34c4499c
commit 68f69b899f
2 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ public class DexReader {
@Nonnull public DexBuffer getDexBuffer() { return dexBuf; }
public int getOffset() { return offset; }
public void setOffset(int offset) { this.offset = offset; }
public int getStringIdItemOffset(int stringIndex) { return dexBuf.getStringIdItemOffset(stringIndex); }
public int getTypeIdItemOffset(int typeIndex) { return dexBuf.getTypeIdItemOffset(typeIndex); }
@ -229,7 +230,7 @@ public class DexReader {
}
public void skipByte() { offset++; }
public void skipBytes(int i) { offset += i; }
public void moveRelative(int i) { offset += i; }
public int readSmallUint(int offset) { return dexBuf.readSmallUint(offset); }
public int readUshort(int offset) { return dexBuf.readUshort(offset); }

View File

@ -131,7 +131,7 @@ public abstract class DexBackedEncodedValue {
case ValueType.METHOD:
case ValueType.ENUM:
int valueArg = b >>> 5;
reader.skipBytes(valueArg+1);
reader.moveRelative(valueArg+1);
break;
case ValueType.ARRAY:
DexBackedArrayEncodedValue.skipFrom(reader);