Methods Summary |
---|
public byte[] | getGrpprl()
return _grpprl;
|
public int | getGrpprlOffset()
return _gOffset;
|
public int | getOperand()
switch (_sizeCode)
{
case 0:
case 1:
return _grpprl[_gOffset];
case 2:
case 4:
case 5:
return LittleEndian.getShort(_grpprl, _gOffset);
case 3:
return LittleEndian.getInt(_grpprl, _gOffset);
case 6:
throw new UnsupportedOperationException("This SPRM contains a variable length operand");
case 7:
byte threeByteInt[] = new byte[4];
threeByteInt[0] = _grpprl[_gOffset];
threeByteInt[1] = _grpprl[_gOffset + 1];
threeByteInt[2] = _grpprl[_gOffset + 2];
threeByteInt[3] = (byte)0;
return LittleEndian.getInt(threeByteInt, 0);
default:
throw new IllegalArgumentException("SPRM contains an invalid size code");
}
|
public int | getOperation()
return _operation;
|
public static int | getOperationFromOpcode(short opcode)
return OP_BITFIELD.getValue(opcode);
|
public int | getSizeCode()
return _sizeCode;
|
public int | getType()
return _type;
|
public static int | getTypeFromOpcode(short opcode)
return TYPE_BITFIELD.getValue(opcode);
|
private int | initSize(short sprm)
switch (_sizeCode)
{
case 0:
case 1:
return 3;
case 2:
case 4:
case 5:
return 4;
case 3:
return 6;
case 6:
if (sprm == LONG_SPRM_TABLE || sprm == LONG_SPRM_PARAGRAPH)
{
int retVal = (0x0000ffff & LittleEndian.getShort(_grpprl, _gOffset)) + 3;
_gOffset += 2;
return retVal;
}
else
{
return (0x000000ff & _grpprl[_gOffset++]) + 3;
}
case 7:
return 5;
default:
throw new IllegalArgumentException("SPRM contains an invalid size code");
}
|
public int | size()
return _size;
|