You will need CBook http://jwork.org/scavis/cbook/ package if you want:
PFile class writes and reads all jhplot objects using a protocol buffers template file which is located in the directory “macros/system/HRecord.proto”. This file was used to generate Java and C++ code as:
protoc --java_out=src HRecord.proto protoc --cpp_out=CBook/src/HRecord HRecord.proto
C++ header file is located in the CBook package, while the corresponding Java class located in jhplot.io. package. The PFile Java class is directly based on HRecord.java.
Try to generate a file with the extension pbu from C++ program and read it using SCaVis. Go to the directory “CBook/doc/example_pbook” compile and run it. It creates a protocol buffers file with several histograms. Then use the Jython scripts located in this directory and run it using SCaVis.
In fact, you can do much more than this. You can write an arbitrary data structure in a C++ and read it using Java. Look at the directory “doc/example_epbook” to get an idea.