I want to view a byte array in the Eclipse (Helios Release, build id: 20100617-1415) Java debugger as an array of hex bytes (2 digits each) or unsigned decimal numbers? Is that possible? How?
For example, I want to display this:
...as: 0, 48, 71, 22, 139, 166, ...
...or as: 0x00, 0x30, 0x47, 0x16, 0x8B, 0xA6, ...
(This is a similar question to "How do I display a byte array as a char array in the Eclipse Java debugger?".)
Arrays. fill(). This method assigns the required byte value to the byte array in Java.
A byte is 8 bits (binary data). A byte array is an array of bytes (tautology FTW!). You could use a byte array to store a collection of binary data, for example, the contents of a file. The downside to this is that the entire file contents must be loaded into memory.
The bytearray class is a mutable sequence of integers in the range of 0 to 256.
Not exact what you want but as I know in DEBUG MODE, there is an option for primitive Types (int, long,...).
Switch to Debug perspective.
In the Variables view click the "menu" item (triangle item before minimize) and select "Java Primitives...".
In the Dialog you can choose between Hex view, Ascii view and unsigned (for byte).
Found this, maybe help: Inside the Memory View
On 3.7 (and maybe earlier), go into preferences, type "primitive display" in the filtering area, and choose to display hex values.
Updated answer in Eclipse Kepler 4.3:
In the Debug
perspective, the Variables
tab will have:
View Menu
(a downward triangle),Minimize
(a line), andMaximize
(a window) icons in the upper-right corner.Steps:
View Menu
> Java
> Java Preferences...
to bring up a menu.Java
> Debug
> Primitive Display Options
.Display hexadecimal values
and then click OK
.Variables
tab.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