use of de.lmu.ifi.dbs.elki.datasource.bundle.BundleWriter in project elki by elki-project.
the class ConvertToBundleApplication method run.
@Override
public void run() {
if (LOG.isVerbose()) {
LOG.verbose("Loading data.");
}
MultipleObjectsBundle bundle = input.loadData();
if (LOG.isVerbose()) {
LOG.verbose("Serializing to output file: " + outfile.toString());
}
// TODO: make configurable?
BundleWriter writer = new BundleWriter();
try {
FileOutputStream fos = new FileOutputStream(outfile);
FileChannel channel = fos.getChannel();
writer.writeBundleStream(bundle.asStream(), channel);
channel.close();
fos.close();
} catch (IOException e) {
LOG.exception("IO Error", e);
}
}
Aggregations