com.android.dex
Class EncodedValueCodec

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

public final class EncodedValueCodec
extends Object

Read and write encoded_value primitives.


Method Summary
static int readSignedInt(ByteInput in, int zwidth)
          Read a signed integer.
static long readSignedLong(ByteInput in, int zwidth)
          Read a signed long.
static int readUnsignedInt(ByteInput in, int zwidth, boolean fillOnRight)
          Read an unsigned integer.
static long readUnsignedLong(ByteInput in, int zwidth, boolean fillOnRight)
          Read an unsigned long.
static void writeRightZeroExtendedValue(ByteOutput out, int type, long value)
          Writes a right-zero-extended value to out.
static void writeSignedIntegralValue(ByteOutput out, int type, long value)
          Writes a signed integral to out.
static void writeUnsignedIntegralValue(ByteOutput out, int type, long value)
          Writes an unsigned integral to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2015. All rights reserved.