diva.sketch.recognition
Class SSTrainingWriter

java.lang.Object
  extended by diva.sketch.recognition.SSTrainingWriter
All Implemented Interfaces:
ModelWriter

public class SSTrainingWriter
extends Object
implements ModelWriter

SSTrainingWriter (Single Stroke Training Writer) takes a SSTrainingModel and writes it out to an outputstream.

Version:
$Revision: 1.1 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu)

Constructor Summary
SSTrainingWriter()
           
 
Method Summary
 void writeModel(Object m, OutputStream out)
          Write the training model to the output stream.
 void writeModel(Object m, Writer writer)
          Write the training model to the character-output stream.
static void writeStroke(TimedStroke s, Writer writer)
          Write out the sequence of points in the stroke.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSTrainingWriter

public SSTrainingWriter()
Method Detail

writeModel

public void writeModel(Object m,
                       OutputStream out)
                throws IOException
Write the training model to the output stream. The caller is responsible for closing the stream.

Throws:
IOException

writeModel

public void writeModel(Object m,
                       Writer writer)
                throws IOException
Write the training model to the character-output stream. The caller is responsible for closing the stream.

Specified by:
writeModel in interface ModelWriter
Throws:
IOException

writeStroke

public static void writeStroke(TimedStroke s,
                               Writer writer)
                        throws IOException
Write out the sequence of points in the stroke. This includes the x, y, and timestamp information of a point.

Throws:
IOException


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.