Package org.apache.kato.common

Examples of org.apache.kato.common.InvalidFileFormat


  private void buildHeader() throws IOException {

    try {
      header = mainProvider.readCString();
    } catch (IOException ioe) {
      throw new InvalidFileFormat("File is not an HPROF file", ioe);
    }
    if (header.equals("JAVA PROFILE 1.0.1") == false
        && header.equals("JAVA PROFILE 1.0.2") == false) {
      throw new InvalidFileFormat("File is not an HPROF file");
    }
    try {
      idSize = mainProvider.readU4();
      timeStamp = mainProvider.readU8();
    } catch (IOException ioe) {
      throw new InvalidFileFormat("HPROF file is truncated", ioe);
    }
    sizes = new HProfDataTypeSizes(idSize);

    recordsOffset = mainProvider.getCurrentLocation();
    long maxOffsetLength = mainProvider.getDataLength() - recordsOffset;
View Full Code Here

TOP

Related Classes of org.apache.kato.common.InvalidFileFormat

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.