Skip to main content
If you need Binary Internals to understand a file format it does not yet support, you can add it yourself by writing a format plug-in — a self-contained Maven module that implements two interfaces from CommonLib. Once the module is on the module path, both the desktop viewer and the web server automatically discover and use it without any changes to their code.

The Two Interfaces

Every format plug-in must implement:
  • PluginDescriptor — a service provider record that advertises the file extension(s) and the FileFormat class to instantiate.
  • FileFormat — an abstract class whose constructor parses the raw bytes and whose generateTreeNode method builds the displayable tree.
The best reference implementations are the modules that ship with the project. FormatBMP is the simplest — BMPFile, BitmapFileHeader, DIBHeader, ColorTable, and PixelArray each implement GenerateTreeNode individually, keeping parsing logic close to tree-building logic. FormatCLASS is the most complete and demonstrates recursive sub-component trees for a complex binary format.