public synchronized void finish() throws IOException
    {
        synchronized(out)
        {
            for(ByteArrayOutputStream baos : all_buffers)
            {
                baos.writeTo(out);
                baos.reset();
            }
            out.flush();
        }
        
    }
public synchronized void finish ( ) throws IOException { synchronized ( out ) { for ( ByteArrayOutputStream baos : all_buffers ) { baos . writeTo ( out ) ; baos . reset ( ) ; } out . flush ( ) ; } }
To be called after all threads are done calling {@link #writePoint(jsat.classifiers.DataPoint, double) }.