I’d like to write a simple detail formatter that displays byte[]
data in the form of a String
(using String.<init>([B)
to do the dirty work).
However, I’m not sure how to find the class name for [B
to use when creating the formatter. Is this even possible? Or, alternatively, is there another way to view byte arrays as strings in the debugger?
Advertisement
Answer
I don’t know how to get eclipse’s detail formatter to automagically display byte arrays as Strings, but you can display a particular byte array by adding new String(byteArray)
as a watch expression.