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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SuffixSensitiveGISModelWriter
public SuffixSensitiveGISModelWriter(AbstractModel model,
java.io.File f)
throws java.io.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:
java.io.IOException
writeUTF
public void writeUTF(java.lang.String s)
throws java.io.IOException
- Specified by:
writeUTF
in class AbstractModelWriter
- Throws:
java.io.IOException
writeInt
public void writeInt(int i)
throws java.io.IOException
- Specified by:
writeInt
in class AbstractModelWriter
- Throws:
java.io.IOException
writeDouble
public void writeDouble(double d)
throws java.io.IOException
- Specified by:
writeDouble
in class AbstractModelWriter
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in class AbstractModelWriter
- Throws:
java.io.IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.