opennlp.maxent.io
Class SuffixSensitiveGISModelWriter
java.lang.Object
opennlp.model.AbstractModelWriter
opennlp.maxent.io.GISModelWriter
opennlp.maxent.io.SuffixSensitiveGISModelWriter
public class SuffixSensitiveGISModelWriter
- extends GISModelWriter
A writer for GIS models which inspects the filename and invokes the
appropriate GISModelWriter depending on the filename's suffixes.
The following assumption are made about suffixes:
.gz --> the file is gzipped (must be the last suffix)
.txt --> the file is plain text
.bin --> the file is binary
SuffixSensitiveGISModelWriter
public SuffixSensitiveGISModelWriter(AbstractModel model,
File f)
throws IOException
- Constructor which takes a GISModel and a File and invokes the
GISModelWriter appropriate for the suffix.
- Parameters:
model
- The GISModel which is to be persisted.f
- The File in which the model is to be stored.
- Throws:
IOException
writeUTF
public void writeUTF(String s)
throws IOException
- Specified by:
writeUTF
in class AbstractModelWriter
- Throws:
IOException
writeInt
public void writeInt(int i)
throws IOException
- Specified by:
writeInt
in class AbstractModelWriter
- Throws:
IOException
writeDouble
public void writeDouble(double d)
throws IOException
- Specified by:
writeDouble
in class AbstractModelWriter
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in class AbstractModelWriter
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.