The performance FAQ mentions serializing parsers to save on compile time but I do not see that DataParser or even ProcessorFactory can be serialized.
The Java API classes are not serializable themselves (though, that's something we may be able to add).
However, the DataProcessor class has a void save(output: java.nio.channels.WritableByteChannel) method, which allows you to serialize the DataProcessor to a WritableByteChannel. To reload a saved DataProcessor, the Compiler class has a static method DataProcessor reload(savedParser: java.ino.channels.ReadableByteChannel) which returns a DataProcessor. There is also a static reload method that accepts a java.io.File for convenience.
void save(output: java.nio.channels.WritableByteChannel)
DataProcessor reload(savedParser: java.ino.channels.ReadableByteChannel)
ProcessorFactory's cannot be saved or reloaded. Only DataProcessors.
A brief example for saving and reloading can be found in the javadoc for the japi package: https://opensource.ncsa.illinois.edu/projects/artifacts/DFDL/1.1.0/documentation/Javadoc/
Thanks, this worked great!
Powered by a free Atlassian Confluence Open Source Project License granted to NCSA OpenSource. Evaluate Confluence today.