Class ShortArrayCodeOutput
java.lang.Object
com.android.dx.io.instructions.BaseCodeCursor
com.android.dx.io.instructions.ShortArrayCodeOutput
- All Implemented Interfaces:
CodeCursor, CodeOutput
Implementation of
CodeOutput that writes to a short[].-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshort[]getArray()Gets the array.voidwrite(byte[] data) Writes the contents of the given array.voidwrite(int[] data) Writes the contents of the given array.voidwrite(long[] data) Writes the contents of the given array.voidwrite(short codeUnit) Writes a code unit.voidwrite(short[] data) Writes the contents of the given array.voidwrite(short u0, short u1) Writes two code units.voidwrite(short u0, short u1, short u2) Writes three code units.voidwrite(short u0, short u1, short u2, short u3) Writes four code units.voidwrite(short u0, short u1, short u2, short u3, short u4) Writes five code units.voidwriteInt(int value) Writes anint, little-endian.voidwriteLong(long value) Writes along, little-endian.Methods inherited from class BaseCodeCursor
advance, baseAddressForCursor, cursor, setBaseAddressMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CodeCursor
baseAddressForCursor, cursor, setBaseAddress
-
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
-
write
public void write(short u0, short u1) Writes two code units.- Specified by:
writein interfaceCodeOutput
-
write
public void write(short u0, short u1, short u2) Writes three code units.- Specified by:
writein interfaceCodeOutput
-
write
public void write(short u0, short u1, short u2, short u3) Writes four code units.- Specified by:
writein interfaceCodeOutput
-
write
public void write(short u0, short u1, short u2, short u3, short u4) Writes five code units.- Specified by:
writein interfaceCodeOutput
-
writeInt
public void writeInt(int value) Writes anint, little-endian.- Specified by:
writeIntin interfaceCodeOutput
-
writeLong
public void writeLong(long value) Writes along, little-endian.- Specified by:
writeLongin interfaceCodeOutput
-
write
public void write(byte[] data) Writes the contents of the given array.- Specified by:
writein interfaceCodeOutput
-
write
public void write(short[] data) Writes the contents of the given array.- Specified by:
writein interfaceCodeOutput
-
write
public void write(int[] data) Writes the contents of the given array.- Specified by:
writein interfaceCodeOutput
-
write
public void write(long[] data) Writes the contents of the given array.- Specified by:
writein interfaceCodeOutput
-