String getStringByID(long stringID) { Long stringIDObj = new Long(stringID); String string = (String) stringCache.get(stringIDObj); if (string == null) { string = createStringByID(stringID); stringCache.put(stringIDObj,string); } return string; }
private long readStringTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STRING) { return 0; } return getDumpBuffer().getID(start + stringIDOffset); }
private String createStringByID(long stringID) { return getString(getStringOffsetByID(stringID)); }
String getVMName() { StringSegment stringSegment = loadClassSegment.hprofHeap.getStringSegment(); return stringSegment.getStringByID(getNameID()); }
private synchronized long getStringOffsetByID(long stringID) { long startLong; if (stringIDMap == null) { stringIDMap = new LongHashMap(32768); long[] offset = new long[] { startOffset }; while (offset[0] < endOffset) { long start = offset[0]; long sID = readStringTag(offset); stringIDMap.put(sID, start); } } startLong = stringIDMap.get(stringID); if (startLong == 0) { return -1; } return startLong; }
private void fillTagBounds(long tagStart) { long[] offset = new long[] { tagStart }; while (offset[0] < dumpBuffer.capacity()) { long start = offset[0]; int tag = readTag(offset); TagBounds bounds = tagBounds[tag]; long end = offset[0]; if (bounds == null) { TagBounds newBounds; if (tag == LOAD_CLASS) { newBounds = new LoadClassSegment(this, start, end); } else if (tag == STRING) { newBounds = new StringSegment(this, start, end); } else if (tag == STACK_TRACE) { newBounds = new StackTraceSegment(this, start, end); } else if (tag == STACK_FRAME) { newBounds = new StackFrameSegment(this, start, end); } else { newBounds = new TagBounds(tag, start, end); } tagBounds[tag] = newBounds; } else { bounds.endOffset = end; } } }
private String getStringByOffset(long offset) { long stringID = getHprofBuffer().getID(fileOffset + offset); return stackFrameSegment.hprofHeap.getStringSegment().getStringByID(stringID); } }
private synchronized long getStringOffsetByID(long stringID) { long startLong; if (stringIDMap == null) { stringIDMap = new LongHashMap(32768); long[] offset = new long[] { startOffset }; while (offset[0] < endOffset) { long start = offset[0]; long sID = readStringTag(offset); stringIDMap.put(sID, start); } } startLong = stringIDMap.get(stringID); if (startLong == 0) { return -1; } return startLong; }
private void fillTagBounds(long tagStart) { long[] offset = new long[] { tagStart }; while (offset[0] < dumpBuffer.capacity()) { long start = offset[0]; int tag = readTag(offset); TagBounds bounds = tagBounds[tag]; long end = offset[0]; if (bounds == null) { TagBounds newBounds; if (tag == LOAD_CLASS) { newBounds = new LoadClassSegment(this, start, end); } else if (tag == STRING) { newBounds = new StringSegment(this, start, end); } else if (tag == STACK_TRACE) { newBounds = new StackTraceSegment(this, start, end); } else if (tag == STACK_FRAME) { newBounds = new StackFrameSegment(this, start, end); } else { newBounds = new TagBounds(tag, start, end); } tagBounds[tag] = newBounds; } else { bounds.endOffset = end; } } }
private String createStringByID(long stringID) { return getString(getStringOffsetByID(stringID)); }
public String getName() { long nameID = classDump.getHprofBuffer().getID(fileOffset); return classDump.getHprof().getStringSegment().getStringByID(nameID); }
private String getString(long start) { HprofByteBuffer dumpBuffer = getDumpBuffer(); if (start == -1) { return "<unknown string>"; // NOI18N } int len = dumpBuffer.getInt(start + lengthOffset); byte[] chars = new byte[len - dumpBuffer.getIDSize()]; dumpBuffer.get(start + UTF8CharsOffset, chars); String s = "Error"; // NOI18N try { s = new String(chars, "UTF-8"); // NOI18N } catch (UnsupportedEncodingException ex) { ex.printStackTrace(); } return s; }
String getStringByID(long stringID) { Long stringIDObj = new Long(stringID); String string = (String) stringCache.get(stringIDObj); if (string == null) { string = createStringByID(stringID); stringCache.put(stringIDObj,string); } return string; }
private synchronized long getStringOffsetByID(long stringID) { long startLong; if (stringIDMap == null) { stringIDMap = new LongHashMap(32768); long[] offset = new long[] { startOffset }; while (offset[0] < endOffset) { long start = offset[0]; long sID = readStringTag(offset); stringIDMap.put(sID, start); } } startLong = stringIDMap.get(stringID); if (startLong == 0) { return -1; } return startLong; }
private void fillTagBounds(long tagStart) { long[] offset = new long[] { tagStart }; while (offset[0] < dumpBuffer.capacity()) { long start = offset[0]; int tag = readTag(offset); TagBounds bounds = tagBounds[tag]; long end = offset[0]; if (bounds == null) { TagBounds newBounds; if (tag == LOAD_CLASS) { newBounds = new LoadClassSegment(this, start, end); } else if (tag == STRING) { newBounds = new StringSegment(this, start, end); } else if (tag == STACK_TRACE) { newBounds = new StackTraceSegment(this, start, end); } else if (tag == STACK_FRAME) { newBounds = new StackFrameSegment(this, start, end); } else { newBounds = new TagBounds(tag, start, end); } tagBounds[tag] = newBounds; } else { bounds.endOffset = end; } } }
private String createStringByID(long stringID) { return getString(getStringOffsetByID(stringID)); }
String getVMName() { StringSegment stringSegment = loadClassSegment.hprofHeap.getStringSegment(); return stringSegment.getStringByID(getNameID()); }
private long readStringTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STRING) { return 0; } return getDumpBuffer().getID(start + stringIDOffset); }
String getStringByID(long stringID) { Long stringIDObj = new Long(stringID); String string = (String) stringCache.get(stringIDObj); if (string == null) { string = createStringByID(stringID); stringCache.put(stringIDObj,string); } return string; }
String getVMName() { StringSegment stringSegment = loadClassSegment.hprofHeap.getStringSegment(); return stringSegment.getStringByID(getNameID()); }