Package javax.tools.diagnostics.image

Examples of javax.tools.diagnostics.image.CorruptDataException


   * @param desc Description of corrupt data.
   * @param pointer locations of corrupt data.
   * @return a CorruptDataException with an initialized CorruptData instance.
   */
  static public CorruptDataException corruptDataException(String desc, ImagePointer pointer) {
    return new CorruptDataException(new CorruptDataImpl(desc, pointer));
  }
View Full Code Here


        break;
      }
    }
   
    if (valueField == null ||  countField == null || offsetField == null) {
      throw new CorruptDataException(new CorruptDataImpl("Unable to find relevant string fields"));
    }

   
    Character[] stringField = (Character[])((JObject)valueField.get(stringObj)).getObjArray();
    int offset = offsetField.getInt(stringObj);
View Full Code Here

   * This method may even be removed.
   */
  @Override
  public Object getTraceBuffer(String bufferName, boolean formatted)
      throws CorruptDataException {
    throw new CorruptDataException(new CorruptDataImpl("There are no trace buffers"));
  }
View Full Code Here

        array[dstStart+i] =  record.getDoubleElement(srcStart+i);
      }
      break;
    }
    default:
      throw new CorruptDataException(new CorruptDataImpl("Primitive array has invalid type of "+record.getElementType()));
    }
  }
View Full Code Here

      case BasicType.INT:
        return "I";
      case BasicType.LONG:
        return "J";
      default:
        throw new CorruptDataException(new CorruptDataImpl("Unexpected basic type of " + field.getType()+
            "encountered."));
      }
    }
View Full Code Here

        }
       
      }

      if (valueSet == false || offsetSet == false || countSet == false ) {
        throw new CorruptDataException(new CorruptDataImpl("Unable to find all String classes fields values"));
      }
      char characters[] = new char[count];
     
      value.arraycopy(offset, characters, 0, count);
     
View Full Code Here

      case BasicType.DOUBLE:
        return new Double(instance.getDoubleField(offset));
      case BasicType.OBJECT:
        return JavaClassImpl.this.heap.getObjectByID(instance.getIDField(offset));
      default:
        throw new CorruptDataException(new CorruptDataImpl("Invalid field type "
            +field.getType()));
      }
    }
View Full Code Here

      case BasicType.INT:
        return new Integer(field.getIntegerField());
      case BasicType.LONG:
        return new Long(field.getLongField());
      default:
        throw new CorruptDataException(new CorruptDataImpl("Unexpected basic type of " + field.getType()+
            "encountered."));   
      }
    }
View Full Code Here

 
  public void testNullConstructor() {
   
      try {
        new CorruptDataException(null);
      fail("expected IllegalArgumentException concerning null value");
      }
      catch(IllegalArgumentException iae) {
       
      }
View Full Code Here

      public ImagePointer getAddress() {
        return null;
      }};
   
    new CorruptDataException(data);
   
  }
View Full Code Here

TOP

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

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.