Class ObjectStreamBase<T>

Namespace
NOpenNLP.Tools.Util
Assembly
NOpenNLP.Tools.dll

Supplies the IObjectStream<T> members that upstream declares as Java 8 default methods.

public abstract class ObjectStreamBase<T> : IObjectStream<T>, IDisposable

Type Parameters

T
Inheritance
ObjectStreamBase<T>
Implements
Derived
Inherited Members

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Releases the resources from this object stream.

protected virtual 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 abstract T Read()

Returns

T

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

Exceptions

IOException

if there is an error during reading

Reset()

Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly. This method can be used to re-read the stream if multiple passes over the objects are required.

The implementation of this method is optional.

public virtual void Reset()

Exceptions

IOException

if there is an error during resetting the stream

NotSupportedException

if reset is not supported on this stream