Package com.android.dx.io.instructions
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
-
Method Summary
Modifier and TypeMethodDescriptionshort[]
getArray()
Gets the array.void
write
(byte[] data) Writes the contents of the given array.void
write
(int[] data) Writes the contents of the given array.void
write
(long[] data) Writes the contents of the given array.void
write
(short codeUnit) Writes a code unit.void
write
(short[] data) Writes the contents of the given array.void
write
(short u0, short u1) Writes two code units.void
write
(short u0, short u1, short u2) Writes three code units.void
write
(short u0, short u1, short u2, short u3) Writes four code units.void
write
(short u0, short u1, short u2, short u3, short u4) Writes five code units.void
writeInt
(int value) Writes anint
, little-endian.void
writeLong
(long value) Writes along
, little-endian.Methods inherited from class com.android.dx.io.instructions.BaseCodeCursor
advance, baseAddressForCursor, cursor, setBaseAddress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.android.dx.io.instructions.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
public void write(short codeUnit) Writes a code unit.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(short u0, short u1) Writes two code units.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(short u0, short u1, short u2) Writes three code units.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(short u0, short u1, short u2, short u3) Writes four code units.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(short u0, short u1, short u2, short u3, short u4) Writes five code units.- Specified by:
write
in interfaceCodeOutput
-
writeInt
public void writeInt(int value) Writes anint
, little-endian.- Specified by:
writeInt
in interfaceCodeOutput
-
writeLong
public void writeLong(long value) Writes along
, little-endian.- Specified by:
writeLong
in interfaceCodeOutput
-
write
public void write(byte[] data) Writes the contents of the given array.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(short[] data) Writes the contents of the given array.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(int[] data) Writes the contents of the given array.- Specified by:
write
in interfaceCodeOutput
-
write
public void write(long[] data) Writes the contents of the given array.- Specified by:
write
in interfaceCodeOutput
-