Top Description Constructors Methods
org.droidparts.dexmaker.dx.util

public final Class Leb128Utils

extends Object
Class Inheritance

Reads and writes DWARFv3 LEB 128 signed and unsigned integers. See DWARF v3 section 7.6.

Constructor Summary

AccessConstructor and Description
private
Leb128Utils()

This class is uninstantiable.

Method Summary

Modifier and TypeMethod and Description
public static int
readSignedLeb128(ByteInput in)

Reads an signed integer from in.

public static int
readUnsignedLeb128(ByteInput in)

Reads an unsigned integer from in.

public static int

Returns:

its write size, in bytes
signedLeb128Size
(int
the value in question
value
)

Gets the number of bytes in the signed LEB128 encoding of the given value.

public static int

Returns:

its write size, in bytes
unsignedLeb128Size
(int
the value in question
value
)

Gets the number of bytes in the unsigned LEB128 encoding of the given value.

public static void
writeSignedLeb128(ByteOutput out, int value)

Writes value as a signed integer to out, starting at offset.

public static void
writeUnsignedLeb128(ByteOutput out, int value)

Writes value as an unsigned integer to out, starting at offset.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Leb128Utilsback to summary
private Leb128Utils()

This class is uninstantiable.

Method Detail

readSignedLeb128back to summary
public static int readSignedLeb128(ByteInput in)

Reads an signed integer from in.

readUnsignedLeb128back to summary
public static int readUnsignedLeb128(ByteInput in)

Reads an unsigned integer from in.

signedLeb128Sizeback to summary
public static int signedLeb128Size(int value)

Gets the number of bytes in the signed LEB128 encoding of the given value.

Parameters
value:int

the value in question

Returns:int

its write size, in bytes

unsignedLeb128Sizeback to summary
public static int unsignedLeb128Size(int value)

Gets the number of bytes in the unsigned LEB128 encoding of the given value.

Parameters
value:int

the value in question

Returns:int

its write size, in bytes

writeSignedLeb128back to summary
public static void writeSignedLeb128(ByteOutput out, int value)

Writes value as a signed integer to out, starting at offset. Returns the number of bytes written.

writeUnsignedLeb128back to summary
public static void writeUnsignedLeb128(ByteOutput out, int value)

Writes value as an unsigned integer to out, starting at offset. Returns the number of bytes written.