Class ShortArrayCodeOutput

java.lang.Object
com.android.dx.io.instructions.BaseCodeCursor
com.android.dx.io.instructions.ShortArrayCodeOutput
All Implemented Interfaces:
CodeCursor, CodeOutput

public final class ShortArrayCodeOutput extends BaseCodeCursor implements CodeOutput
Implementation of CodeOutput that writes to a short[].
  • Constructor Details

    • ShortArrayCodeOutput

      public ShortArrayCodeOutput(int maxSize)
      Constructs an instance.
      Parameters:
      maxSize - the maximum number of code units that will be written
  • Method Details

    • getArray

      public short[] getArray()
      Gets the array. The returned array contains exactly the data written (e.g. no leftover space at the end).
    • write

      public void write(short codeUnit)
      Writes a code unit.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(short u0, short u1)
      Writes two code units.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(short u0, short u1, short u2)
      Writes three code units.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(short u0, short u1, short u2, short u3)
      Writes four code units.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(short u0, short u1, short u2, short u3, short u4)
      Writes five code units.
      Specified by:
      write in interface CodeOutput
    • writeInt

      public void writeInt(int value)
      Writes an int, little-endian.
      Specified by:
      writeInt in interface CodeOutput
    • writeLong

      public void writeLong(long value)
      Writes a long, little-endian.
      Specified by:
      writeLong in interface CodeOutput
    • write

      public void write(byte[] data)
      Writes the contents of the given array.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(short[] data)
      Writes the contents of the given array.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(int[] data)
      Writes the contents of the given array.
      Specified by:
      write in interface CodeOutput
    • write

      public void write(long[] data)
      Writes the contents of the given array.
      Specified by:
      write in interface CodeOutput