com.android.dex
Class Dex.Section

java.lang.Object
  extended by com.android.dex.Dex.Section
All Implemented Interfaces:
ByteInput, ByteOutput
Enclosing class:
Dex

public final class Dex.Section
extends Object
implements ByteInput, ByteOutput


Method Summary
 void alignToFourBytes()
          Skips bytes until the position is aligned to a multiple of 4.
 void alignToFourBytesWithZeroFill()
          Writes 0x00 until the position is aligned to a multiple of 4.
 void assertFourByteAligned()
           
 int getPosition()
           
 Annotation readAnnotation()
           
 byte readByte()
          Returns a byte.
 byte[] readByteArray(int length)
           
 ClassDef readClassDef()
           
 EncodedValue readEncodedArray()
           
 FieldId readFieldId()
           
 int readInt()
           
 MethodId readMethodId()
           
 ProtoId readProtoId()
           
 short readShort()
           
 short[] readShortArray(int length)
           
 int readSleb128()
           
 String readString()
           
 TypeList readTypeList()
           
 int readUleb128()
           
 int readUleb128p1()
           
 int readUnsignedShort()
           
 int remaining()
          Returns the number of bytes remaining in this section.
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.

Specified by:
readByte in interface ByteInput

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

public TypeList readTypeList()

readString

public String readString()

readFieldId

public FieldId readFieldId()

readMethodId

public MethodId readMethodId()

readProtoId

public ProtoId readProtoId()

readClassDef

public ClassDef readClassDef()

readAnnotation

public Annotation readAnnotation()

readEncodedArray

public EncodedValue 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 interface ByteOutput

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

public void writeStringData(String value)

writeTypeList

public void writeTypeList(TypeList typeList)

remaining

public int remaining()
Returns the number of bytes remaining in this section.


used

public int used()
Returns the number of bytes used by this section.



Copyright © 2015. All rights reserved.