Package javax.tools.diagnostics.image

Examples of javax.tools.diagnostics.image.ImageAddressSpace


    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++){
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.image.ImageAddressSpace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.