Package com.android.dex
Class Dex.Section
java.lang.Object
com.android.dex.Dex.Section
- All Implemented Interfaces:
ByteInput
,ByteOutput
- Enclosing class:
Dex
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Skips bytes until the position is aligned to a multiple of 4.void
Writes 0x00 until the position is aligned to a multiple of 4.void
int
byte
readByte()
Returns a byte.byte[]
readByteArray
(int length) int
readInt()
short
short[]
readShortArray
(int length) int
int
int
int
void
skip
(int count) int
used()
Returns the number of bytes used by this section.void
write
(byte[] bytes) void
write
(short[] shorts) void
writeByte
(int b) Writes a byte.void
writeInt
(int i) void
writeShort
(short i) void
writeSleb128
(int i) void
writeStringData
(String value) void
writeTypeList
(TypeList typeList) void
writeUleb128
(int i) void
writeUleb128p1
(int i) void
writeUnsignedShort
(int i)
-
Method Details
-
getPosition
public int getPosition() -
readInt
public int readInt() -
readShort
public short readShort() -
readUnsignedShort
public int readUnsignedShort() -
readByte
public byte readByte()Description copied from interface:ByteInput
Returns a byte. -
readByteArray
public byte[] readByteArray(int length) -
readShortArray
public short[] readShortArray(int length) -
readUleb128
public int readUleb128() -
readUleb128p1
public int readUleb128p1() -
readSleb128
public int readSleb128() -
writeUleb128p1
public void writeUleb128p1(int i) -
readTypeList
-
readString
-
readFieldId
-
readMethodId
-
readProtoId
-
readCallSiteId
-
readMethodHandle
-
readClassDef
-
readAnnotation
-
readEncodedArray
-
skip
public void skip(int count) -
alignToFourBytes
public void alignToFourBytes()Skips bytes until the position is aligned to a multiple of 4. -
alignToFourBytesWithZeroFill
public void alignToFourBytesWithZeroFill()Writes 0x00 until the position is aligned to a multiple of 4. -
assertFourByteAligned
public void assertFourByteAligned() -
write
public void write(byte[] bytes) -
writeByte
public void writeByte(int b) Description copied from interface:ByteOutput
Writes a byte.- Specified by:
writeByte
in interfaceByteOutput
-
writeShort
public void writeShort(short i) -
writeUnsignedShort
public void writeUnsignedShort(int i) -
write
public void write(short[] shorts) -
writeInt
public void writeInt(int i) -
writeUleb128
public void writeUleb128(int i) -
writeSleb128
public void writeSleb128(int i) -
writeStringData
-
writeTypeList
-
used
public int used()Returns the number of bytes used by this section.
-