Class BinaryQNModelWriter

Namespace
NOpenNLP.Tools.Ml.Maxent.Io
Assembly
NOpenNLP.Tools.dll
public class BinaryQNModelWriter : QNModelWriter, IDisposable
Inheritance
BinaryQNModelWriter
Implements
Inherited Members

Constructors

BinaryQNModelWriter(AbstractModel, FileInfo)

Constructor which takes a GISModel and a FileInfo 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".

public BinaryQNModelWriter(AbstractModel model, FileInfo f)

Parameters

model AbstractModel

The GISModel which is to be persisted.

f FileInfo

The file in which the model is to be persisted.

BinaryQNModelWriter(AbstractModel, Stream)

Constructor which takes a GISModel and a Stream and prepares itself to write the model to that stream.

public BinaryQNModelWriter(AbstractModel model, Stream dos)

Parameters

model AbstractModel

The GISModel which is to be persisted.

dos Stream

The stream which will be used to persist the model.

Fields

output

protected readonly Stream output

Field Value

Stream

Methods

CloseCore()

Performs the actual close. Called at most once.

protected override void CloseCore()

Exceptions

IOException

if there is an error during writing

WriteDouble(double)

public override void WriteDouble(double d)

Parameters

d double

Exceptions

IOException

if there is an error during writing

WriteInt32(int)

public override void WriteInt32(int i)

Parameters

i int

Exceptions

IOException

if there is an error during writing

WriteUTF(string)

public override void WriteUTF(string s)

Parameters

s string

Exceptions

IOException

if there is an error during writing