Example usage for weka.core.converters Saver setDestination

List of usage examples for weka.core.converters Saver setDestination

Introduction

In this page you can find the example usage for weka.core.converters Saver setDestination.

Prototype

void setDestination(OutputStream output) throws IOException;

Source Link

Document

Resets the Saver object and sets the destination to be the supplied InputStream.

Usage

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();
}