* @param objectID
* The array object ID.
* @return The retrieved values.
*/
public Value[] getArrayValues(long objectID) {
CommandPacket command = new CommandPacket(
JDWPCommands.ArrayReferenceCommandSet.CommandSetID,
JDWPCommands.ArrayReferenceCommandSet.LengthCommand);
command.setNextValueAsArrayID(objectID);
ReplyPacket reply = checkReply(performCommand(command));
int length = reply.getNextValueAsInt();
if (length == 0) {
return null;
}
command = new CommandPacket(
JDWPCommands.ArrayReferenceCommandSet.CommandSetID,
JDWPCommands.ArrayReferenceCommandSet.GetValuesCommand);
command.setNextValueAsArrayID(objectID);
command.setNextValueAsInt(0);
command.setNextValueAsInt(length);
reply = checkReply(performCommand(command));
ArrayRegion arrayRegion = reply.getNextValueAsArrayRegion();
Value[] values = new Value[length];
for (int i = 0; i < length; i++) {