mirror of
https://github.com/pxb1988/dex2jar.git
synced 2024-11-23 13:19:46 +00:00
add method to array datain
--HG-- branch : 0.0.9.x
This commit is contained in:
parent
52907d62bc
commit
0b02af4408
@ -29,10 +29,18 @@ public class ArrayDataIn extends ByteArrayInputStream implements DataIn {
|
||||
return new ArrayDataIn(data, false);
|
||||
}
|
||||
|
||||
public static ArrayDataIn be(byte[] data, int offset, int length) {
|
||||
return new ArrayDataIn(data, offset, length, false);
|
||||
}
|
||||
|
||||
public static ArrayDataIn le(byte[] data) {
|
||||
return new ArrayDataIn(data, true);
|
||||
}
|
||||
|
||||
public static ArrayDataIn le(byte[] data, int offset, int length) {
|
||||
return new ArrayDataIn(data, offset, length, true);
|
||||
}
|
||||
|
||||
private boolean isLE;
|
||||
|
||||
private Stack<Integer> stack = new Stack<Integer>();
|
||||
@ -42,14 +50,19 @@ public class ArrayDataIn extends ByteArrayInputStream implements DataIn {
|
||||
this.isLE = isLE;
|
||||
}
|
||||
|
||||
public ArrayDataIn(byte[] buf, int offset, int length, boolean isLE) {
|
||||
super(buf, offset, length);
|
||||
this.isLE = isLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentPosition() {
|
||||
return super.pos;
|
||||
return super.pos - super.mark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void move(int absOffset) {
|
||||
super.pos = absOffset;
|
||||
super.pos = absOffset + super.mark;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user