mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-05-01 06:34:26 +02:00
create convenient byte and int setter
This commit is contained in:
parent
bedaf09e20
commit
d66eeea70a
@ -80,6 +80,9 @@ public class ByteArray extends BlockItem {
|
||||
}
|
||||
return 0xff & b;
|
||||
}
|
||||
public final void put(int index, int byteValue){
|
||||
put(index, (byte) byteValue);
|
||||
}
|
||||
public final void put(int index, byte value){
|
||||
byte[] bts = getBytesInternal();
|
||||
bts[index]=value;
|
||||
@ -101,6 +104,9 @@ public class ByteArray extends BlockItem {
|
||||
val=left|right;
|
||||
put(byteOffset, (byte) val);
|
||||
}
|
||||
public final void putShort(int offset, int value){
|
||||
putShort(offset, (short) value);
|
||||
}
|
||||
public final void putShort(int offset, short val){
|
||||
byte[] bts = getBytesInternal();
|
||||
bts[offset+1]= (byte) (val >>> 8 & 0xff);
|
||||
|
Loading…
x
Reference in New Issue
Block a user