opennlp.maxent.io
Class BinaryGISModelWriter
java.lang.Object
opennlp.maxent.io.GISModelWriter
opennlp.maxent.io.BinaryGISModelWriter
public class BinaryGISModelWriter
- extends GISModelWriter
Model writer that saves models in binary format.
- Version:
- $Revision: 1.2 $, $Date: 2004/08/29 18:59:35 $
- Author:
- Jason Baldridge
Constructor Summary |
BinaryGISModelWriter(GISModel model,
java.io.DataOutputStream dos)
Constructor which takes a GISModel and a DataOutputStream and prepares
itself to write the model to that stream. |
BinaryGISModelWriter(GISModel model,
java.io.File f)
Constructor which takes a GISModel and a File and prepares itself to
write the model to that file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryGISModelWriter
public BinaryGISModelWriter(GISModel model,
java.io.File f)
throws java.io.IOException
- Constructor which takes a GISModel and a File and prepares itself to
write the model to that file. Detects whether the file is gzipped or not
based on whether the suffix contains ".gz".
- Parameters:
model
- The GISModel which is to be persisted.f
- The File in which the model is to be persisted.
- Throws:
java.io.IOException
BinaryGISModelWriter
public BinaryGISModelWriter(GISModel model,
java.io.DataOutputStream dos)
- Constructor which takes a GISModel and a DataOutputStream and prepares
itself to write the model to that stream.
- Parameters:
model
- The GISModel which is to be persisted.dos
- The stream which will be used to persist the model.
writeUTF
protected void writeUTF(java.lang.String s)
throws java.io.IOException
- Specified by:
writeUTF
in class GISModelWriter
- Throws:
java.io.IOException
writeInt
protected void writeInt(int i)
throws java.io.IOException
- Specified by:
writeInt
in class GISModelWriter
- Throws:
java.io.IOException
writeDouble
protected void writeDouble(double d)
throws java.io.IOException
- Specified by:
writeDouble
in class GISModelWriter
- Throws:
java.io.IOException
close
protected void close()
throws java.io.IOException
- Specified by:
close
in class GISModelWriter
- Throws:
java.io.IOException
Copyright © 2005 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.