Package opennlp.tools.ml.model
Klasse ChecksumEventStream
- Alle implementierten Schnittstellen:
AutoCloseable
,ObjectStream<Event>
A
Checksum
-based event stream
implementation.
Computes the checksum while consuming the event stream.
By default, this implementation will use CRC32C
for checksum calculations
as it can use of CPU-specific acceleration instructions at runtime.- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungChecksumEventStream
(ObjectStream<Event> eventStream) Initializes anChecksumEventStream
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunglong
Calculates and returns the (current) checksum.read()
Returns the nextObjectStream
object.Von Klasse geerbte Methoden opennlp.tools.util.AbstractObjectStream
close, reset
-
Konstruktordetails
-
ChecksumEventStream
Initializes anChecksumEventStream
.- Parameter:
eventStream
- TheObjectStream
that provides theEvent
samples.
-
-
Methodendetails
-
read
Beschreibung aus Schnittstelle kopiert:ObjectStream
Returns the nextObjectStream
object. Calling this method repeatedly until it returnsnull
will return each object from the underlying source exactly once.- Angegeben von:
read
in SchnittstelleObjectStream<Event>
- Setzt außer Kraft:
read
in KlasseAbstractObjectStream<Event>
- Gibt zurück:
- The next object or
null
to signal that the stream is exhausted. - Löst aus:
IOException
- Thrown if there is an error during reading.
-
calculateChecksum
public long calculateChecksum()Calculates and returns the (current) checksum.Note: This should be called once the underlying stream has been (fully) consumed.
- Gibt zurück:
- The calculated checksum as
long
.
-