void readHeader() throws IOException { long[] offset = new long[1]; String magic = readStringNull(offset, MINIMAL_SIZE); if (DEBUG) { System.out.println("Magic " + magic); // NOI18N } if (magic1.equals(magic)) { version = JAVA_PROFILE_1_0_1; } else if (magic2.equals(magic)) { version = JAVA_PROFILE_1_0_2; } else { if (DEBUG) { System.out.println("Invalid version"); // NOI18N } String errText = ResourceBundle.getBundle("org/netbeans/lib/profiler/heap/Bundle") .getString("HprofByteBuffer_InvalidFormat"); throw new IOException(errText); } idSize = getInt(offset[0]); offset[0] += 4; time = getLong(offset[0]); offset[0] += 8; if (DEBUG) { System.out.println("ID " + idSize); // NOI18N } if (DEBUG) { System.out.println("Date " + new Date(time).toString()); // NOI18N } headerSize = offset[0]; }
void readHeader() throws IOException { long[] offset = new long[1]; String magic = readStringNull(offset, MINIMAL_SIZE); if (DEBUG) { System.out.println("Magic " + magic); // NOI18N } if (magic1.equals(magic)) { version = JAVA_PROFILE_1_0_1; } else if (magic2.equals(magic)) { version = JAVA_PROFILE_1_0_2; } else { if (DEBUG) { System.out.println("Invalid version"); // NOI18N } String errText = ResourceBundle.getBundle("org/netbeans/lib/profiler/heap/Bundle") .getString("HprofByteBuffer_InvalidFormat"); throw new IOException(errText); } idSize = getInt(offset[0]); offset[0] += 4; time = getLong(offset[0]); offset[0] += 8; if (DEBUG) { System.out.println("ID " + idSize); // NOI18N } if (DEBUG) { System.out.println("Date " + new Date(time).toString()); // NOI18N } headerSize = offset[0]; }
void readHeader() throws IOException { long[] offset = new long[1]; String magic = readStringNull(offset, MINIMAL_SIZE); if (DEBUG) { System.out.println("Magic " + magic); // NOI18N } if (magic1.equals(magic)) { version = JAVA_PROFILE_1_0_1; } else if (magic2.equals(magic)) { version = JAVA_PROFILE_1_0_2; } else { if (DEBUG) { System.out.println("Invalid version"); // NOI18N } String errText = ResourceBundle.getBundle("org/netbeans/lib/profiler/heap/Bundle") .getString("HprofByteBuffer_InvalidFormat"); throw new IOException(errText); } idSize = getInt(offset[0]); offset[0] += 4; time = getLong(offset[0]); offset[0] += 8; if (DEBUG) { System.out.println("ID " + idSize); // NOI18N } if (DEBUG) { System.out.println("Date " + new Date(time).toString()); // NOI18N } headerSize = offset[0]; }