Package org.eclipse.mat.snapshot.model
Class PrettyPrinter
java.lang.Object
org.eclipse.mat.snapshot.model.PrettyPrinter
Utility class to extract String representations of heap dump objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringarrayAsString(IPrimitiveArray charArray, int offset, int count, int limit) Convert achar[]object into a String.static StringobjectAsString(IObject stringObject, int limit) Convert ajava.lang.Stringobject into a String.
-
Method Details
-
objectAsString
Convert ajava.lang.Stringobject into a String.- Parameters:
stringObject- the String object in the dumplimit- maximum number of characters to return- Returns:
- the value of the string from the dump, as a String
- Throws:
SnapshotException- if there is a problem with the conversion
-
arrayAsString
Convert achar[]object into a String. Unprintable characters are returned as \\unnnn values- Parameters:
charArray- the character arrayoffset- where to startcount- how many characters to readlimit- the maximum number of characters to read- Returns:
- the characters as a string
-