// Get the info file within that folder.
ProgramResourceLocator.File compileModuleInfoFileLocator = moduleFolder.extendFile(module.getName() + "." + Module.COMPILED_MODULE_SUFFIX);
// Put the module info into a byte array.
NakedByteArrayOutputStream bos = new NakedByteArrayOutputStream(8192);
RecordOutputStream ros = new RecordOutputStream(bos);
Exception exception = null;
try {
module.write(ros);
} catch (IOException saveException) {
exception = saveException;
} finally {
try {
ros.close();
} catch (IOException ioe) {
exception = ioe;
}
}