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 TypMethodeBeschreibunglongCalculates and returns the (current) checksum.read()Returns the nextObjectStreamobject.Von Klasse geerbte Methoden opennlp.tools.util.AbstractObjectStream
close, reset
-
Konstruktordetails
-
ChecksumEventStream
Initializes anChecksumEventStream.- Parameter:
eventStream- TheObjectStreamthat provides theEventsamples.
-
-
Methodendetails
-
read
Beschreibung aus Schnittstelle kopiert:ObjectStreamReturns the nextObjectStreamobject. Calling this method repeatedly until it returnsnullwill return each object from the underlying source exactly once.- Angegeben von:
readin SchnittstelleObjectStream<Event>- Setzt außer Kraft:
readin KlasseAbstractObjectStream<Event>- Gibt zurück:
- The next object or
nullto 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.
-