Share My Creation [B4J] Hex View CustomView

Here is my take on a Hex dump as a custom view.​

1579017399494.png

You can:

  • Explore any size file
  • Load one or more arrays of bytes
  • Search the data
There is a degree of customisation in the designer and subsequently in the class for setting colours used for different highlighting. Turning the headers on/off, Limiting number of found results. Font size is calculated automatically dependant on the views width. You can use any font, but I think the Monospaced font looks best.

You can select data from the right hand column and press F3 or select Find from the find menu to search the file or data.

The library is a b4xlib, but is only available for B4j.

DependsOn : jXUI, JavaObject, jReflection, jRandomAccessFile, ByteConverter

Files:
  • HexView.zip shows example usage.
  • jHexViewer-b4x.b4xlib contains the library.
  • HexViewer.xml contains the libraries documentation xml file that you can drag on to BuildDocs, or use another Library documentation viewer available on the forum.

Update V 1.3
Bug fix sizing window too small caused a read error​

Update V1.4
Implemented Klaus's suggestions, it looks a lot cleaner, thank you Klaus. You only need to download the jHexViewer-b4x.b4xlib file.​


If you try it, please let me know how you get on with it.
 

Attachments

  • 1577640372573.png
    1577640372573.png
    140.3 KB · Views: 4,825
  • HexViewer.xml
    33.8 KB · Views: 428
  • HexViewer.zip
    3.7 KB · Views: 420
  • jHexViewer-b4x.b4xlib
    27.1 KB · Views: 369
Last edited:

stevel05

Expert
Licensed User
Longtime User
Update V1.4
Implemented Klaus's suggestions, it looks a lot cleaner, thank you Klaus.
 

stevel05

Expert
Licensed User
Longtime User
This utility does not let you edit a file. Editing an arbitrary file is fraught with danger so this is a viewer only.
 
Top