There is a Java class com.wm.util.coder.IDataBinCoder, which will do everything the XML coder of savePipelineToFile, but serializes to a binary format and supports Java Serializable as a one of the types of object encoded.
Objects like Java Streams still can’t roundtrip, but most interesting objects do. One tricky thing is the classloading of the objects during decode time. It should be described in the API JavaDoc, but here are the interesting methods:
public IDataBinCoder()
public IDataBinCoder( ClassLoader thePriorityClassLoader )
public void encode(OutputStream os, IData data)
throws IOException, InvalidDatatypeException
public IData decode(InputStream is)
throws IOException, InvalidDatatypeException
See also com.wm.util.code.IDataCoder for some helper methods for dealing with files and byte:
public IData readFromFile(File f)
throws IOException
public void writeToFile(File f, IData pipeline)
throws IOException
It isn’t too tough to make you own savePipelineToFile.
HTH,
Fred
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods