Class HashSumEventStream

Namespace
NOpenNLP.Tools.Ml.Model
Assembly
NOpenNLP.Tools.dll
public class HashSumEventStream : AbstractObjectStream<Event?>, IObjectStream<Event?>, IDisposable
Inheritance
HashSumEventStream
Implements
Inherited Members

Constructors

HashSumEventStream(IObjectStream<Event?>)

public HashSumEventStream(IObjectStream<Event?> eventStream)

Parameters

eventStream IObjectStream<Event>

Methods

CalculateHashSum()

Calculates the hash sum of the stream. The method must be called after the stream is completely consumed.

public virtual BigInteger CalculateHashSum()

Returns

BigInteger

the hash sum

Exceptions

InvalidOperationException

if the stream is not consumed completely.

Dispose(bool)

Releases the resources from this object stream.

protected override void Dispose(bool disposing)

Parameters

disposing bool

Read()

Returns the next object. Calling this method repeatedly until it returns null will return each object from the underlying source exactly once.

public override Event? Read()

Returns

Event

the next object or null to signal that the stream is exhausted

Exceptions

IOException

if there is an error during reading