child_commands = null;
}
public void doCommand(Stack args, Image loadedImage, HashMap properties){
StringBuffer stringBuffer = new StringBuffer();
ImageAddressSpace imageAddressSpace = Utils._extractAddressSpace(loadedImage);
long addressInDecimal = 0;
int numBytesToPrint = 16*16; //dump 256 bytes by default
int asciiIndex = 0;
if (!args.isEmpty()){
Long address = Utils.longFromString((String)args.pop());
if(null == address){
out.error("Specified address is invalid");
return;
}
addressInDecimal = address.longValue();
}
else
{
out.error("\"hexdump\" requires at least an address parameter");
return;
}
if (!args.isEmpty()){
try{
numBytesToPrint = Integer.parseInt((String)args.pop());
}catch(NumberFormatException nfe){
out.error("Specified length is invalid");
return;
}
}
ImagePointer imagePointerBase = imageAddressSpace.getPointer(addressInDecimal);
String asciiChars = "";
long i;
for (i = 0; i < numBytesToPrint; i++){