List of usage examples for weka.core.converters Saver setDestination
void setDestination(OutputStream output) throws IOException;
From source file:com.kdcloud.lib.rest.ext.InstancesRepresentation.java
License:Open Source License
public byte[] getBuffer() throws IOException { Saver saver = getSaver(); ByteArrayOutputStream out = new ByteArrayOutputStream(); saver.setDestination(out); saver.setInstances(getInstances());/*w w w .j a va 2s. c o m*/ saver.writeBatch(); return out.toByteArray(); }