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?
If your question is how would I get a string representation of a byte array of [0,1,2] to be "[0,1,2]", I would suggest you take a look at Arrays.toString(byte[])
http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#toString(byte[])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With