char[] getChars(int start, int length) { assert getType() == HprofHeap.CHAR; char[] chars = new char[length]; long offset = getArrayStartOffset() + ((long) start * (long) charSize); HprofByteBuffer dumpBuffer = dumpClass.getHprofBuffer(); for (int i = 0; i < length; i++) { chars[i] = dumpBuffer.getChar(offset + (i * charSize)); } return chars; }
private byte getType() { HprofByteBuffer dumpBuffer = dumpClass.getHprofBuffer(); int idSize = dumpBuffer.getIDSize(); return dumpBuffer.get(fileOffset + 1 + idSize + 4 + 4); }