Class EncodedValueCodec

java.lang.Object
com.android.dex.EncodedValueCodec

public final class EncodedValueCodec extends Object
Read and write encoded_value primitives.
  • Method Details

    • writeSignedIntegralValue

      public static void writeSignedIntegralValue(ByteOutput out, int type, long value)
      Writes a signed integral to out.
    • writeUnsignedIntegralValue

      public static void writeUnsignedIntegralValue(ByteOutput out, int type, long value)
      Writes an unsigned integral to out.
    • writeRightZeroExtendedValue

      public static void writeRightZeroExtendedValue(ByteOutput out, int type, long value)
      Writes a right-zero-extended value to out.
    • readSignedInt

      public static int readSignedInt(ByteInput in, int zwidth)
      Read a signed integer.
      Parameters:
      zwidth - byte count minus one
    • readUnsignedInt

      public static int readUnsignedInt(ByteInput in, int zwidth, boolean fillOnRight)
      Read an unsigned integer.
      Parameters:
      zwidth - byte count minus one
      fillOnRight - true to zero fill on the right; false on the left
    • readSignedLong

      public static long readSignedLong(ByteInput in, int zwidth)
      Read a signed long.
      Parameters:
      zwidth - byte count minus one
    • readUnsignedLong

      public static long readUnsignedLong(ByteInput in, int zwidth, boolean fillOnRight)
      Read an unsigned long.
      Parameters:
      zwidth - byte count minus one
      fillOnRight - true to zero fill on the right; false on the left