com.android.dx.io.instructions
Class ShortArrayCodeOutput

java.lang.Object
  extended by com.android.dx.io.instructions.BaseCodeCursor
      extended by 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 Summary
ShortArrayCodeOutput(int maxSize)
          Constructs an instance.
 
Method Summary
 short[] 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 an int, little-endian.
 void writeLong(long value)
          Writes a long, 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 Detail

ShortArrayCodeOutput

public ShortArrayCodeOutput(int maxSize)
Constructs an instance.

Parameters:
maxSize - the maximum number of code units that will be written
Method Detail

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)
Description copied from interface: CodeOutput
Writes a code unit.

Specified by:
write in interface CodeOutput

write

public void write(short u0,
                  short u1)
Description copied from interface: CodeOutput
Writes two code units.

Specified by:
write in interface CodeOutput

write

public void write(short u0,
                  short u1,
                  short u2)
Description copied from interface: CodeOutput
Writes three code units.

Specified by:
write in interface CodeOutput

write

public void write(short u0,
                  short u1,
                  short u2,
                  short u3)
Description copied from interface: CodeOutput
Writes four code units.

Specified by:
write in interface CodeOutput

write

public void write(short u0,
                  short u1,
                  short u2,
                  short u3,
                  short u4)
Description copied from interface: CodeOutput
Writes five code units.

Specified by:
write in interface CodeOutput

writeInt

public void writeInt(int value)
Description copied from interface: CodeOutput
Writes an int, little-endian.

Specified by:
writeInt in interface CodeOutput

writeLong

public void writeLong(long value)
Description copied from interface: CodeOutput
Writes a long, little-endian.

Specified by:
writeLong in interface CodeOutput

write

public void write(byte[] data)
Description copied from interface: CodeOutput
Writes the contents of the given array.

Specified by:
write in interface CodeOutput

write

public void write(short[] data)
Description copied from interface: CodeOutput
Writes the contents of the given array.

Specified by:
write in interface CodeOutput

write

public void write(int[] data)
Description copied from interface: CodeOutput
Writes the contents of the given array.

Specified by:
write in interface CodeOutput

write

public void write(long[] data)
Description copied from interface: CodeOutput
Writes the contents of the given array.

Specified by:
write in interface CodeOutput


Copyright © 2013. All Rights Reserved.