Package org.eclipse.mat.snapshot.model
Class PrettyPrinter
- java.lang.Object
-
- org.eclipse.mat.snapshot.model.PrettyPrinter
-
public final class PrettyPrinter extends Object
Utility class to extract String representations of heap dump objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
arrayAsString(IPrimitiveArray charArray, int offset, int count, int limit)
Convert achar[]
object into a String.static String
objectAsString(IObject stringObject, int limit)
Convert ajava.lang.String
object into a String.
-
-
-
Method Detail
-
objectAsString
public static String objectAsString(IObject stringObject, int limit) throws SnapshotException
Convert ajava.lang.String
object 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
-
arrayAsString
public static String arrayAsString(IPrimitiveArray charArray, int offset, int count, int limit)
Convert achar[]
object into a String. Unprintable characters are returned as \\unnnn values- Parameters:
charArray
-offset
- where to startcount
- how many characters to readlimit
- the maximum number of characters to read- Returns:
- the characters as a string
-
-