com.android.dx.io.instructions
Class ShortArrayCodeInput

java.lang.Object
  extended by com.android.dx.io.instructions.BaseCodeCursor
      extended by com.android.dx.io.instructions.ShortArrayCodeInput
All Implemented Interfaces:
CodeCursor, CodeInput

public final class ShortArrayCodeInput
extends BaseCodeCursor
implements CodeInput

Implementation of CodeInput that reads from a short[].


Constructor Summary
ShortArrayCodeInput(short[] array)
          Constructs an instance.
 
Method Summary
 boolean hasMore()
          Returns whether there are any more code units to read.
 int read()
          Reads a code unit.
 int readInt()
          Reads two code units, treating them as a little-endian int.
 long readLong()
          Reads four code units, treating them as a little-endian long.
 
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

ShortArrayCodeInput

public ShortArrayCodeInput(short[] array)
Constructs an instance.

Method Detail

hasMore

public boolean hasMore()
Description copied from interface: CodeInput
Returns whether there are any more code units to read. This is analogous to hasNext() on an interator.

Specified by:
hasMore in interface CodeInput

read

public int read()
         throws EOFException
Description copied from interface: CodeInput
Reads a code unit.

Specified by:
read in interface CodeInput
Throws:
EOFException

readInt

public int readInt()
            throws EOFException
Description copied from interface: CodeInput
Reads two code units, treating them as a little-endian int.

Specified by:
readInt in interface CodeInput
Throws:
EOFException

readLong

public long readLong()
              throws EOFException
Description copied from interface: CodeInput
Reads four code units, treating them as a little-endian long.

Specified by:
readLong in interface CodeInput
Throws:
EOFException


Copyright © 2013. All Rights Reserved.