Klasse ChecksumEventStream

java.lang.Object
opennlp.tools.util.AbstractObjectStream<Event>
opennlp.tools.ml.model.ChecksumEventStream
Alle implementierten Schnittstellen:
AutoCloseable, ObjectStream<Event>

public class ChecksumEventStream extends AbstractObjectStream<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:
  • Konstruktordetails

  • Methodendetails

    • read

      public Event read() throws IOException
      Beschreibung aus Schnittstelle kopiert: ObjectStream
      Returns the next ObjectStream object. Calling this method repeatedly until it returns null will return each object from the underlying source exactly once.
      Angegeben von:
      read in Schnittstelle ObjectStream<Event>
      Setzt außer Kraft:
      read in Klasse AbstractObjectStream<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.