private void init(AbstractModel model, DataOutputStream dos) {
if (model.getModelType() == ModelType.Perceptron) {
delegateWriter = new BinaryPerceptronModelWriter(model,dos);
}
else if (model.getModelType() == ModelType.Maxent) {
delegateWriter = new BinaryGISModelWriter(model,dos);
}
else if (model.getModelType() == ModelType.MaxentQn) {
delegateWriter = new BinaryQNModelWriter(model,dos);
}
}