Klasse AbstractObjectStream<T>

java.lang.Object
opennlp.tools.util.AbstractObjectStream<T>
Typparameter:
T - The generic type representing samples in the stream of samples.
Alle implementierten Schnittstellen:
AutoCloseable, ObjectStream<T>
Bekannte direkte Unterklassen:
ChecksumEventStream

public abstract class AbstractObjectStream<T> extends Object implements ObjectStream<T>
A base ObjectStream implementation.
  • Methodendetails

    • read

      public T 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<T>
      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.
    • reset

      public void reset() throws IOException, UnsupportedOperationException
      Beschreibung aus Schnittstelle kopiert: ObjectStream
      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.

      Angegeben von:
      reset in Schnittstelle ObjectStream<T>
      Löst aus:
      IOException - Thrown if there is an error during resetting the stream.
      UnsupportedOperationException - Thrown if the reset() is not supported. By default, this is the case.
    • close

      public void close() throws IOException
      Beschreibung aus Schnittstelle kopiert: ObjectStream
      Closes the ObjectStream and releases all allocated resources. After close was called, it's not allowed to call ObjectStream.read() or ObjectStream.reset().
      Angegeben von:
      close in Schnittstelle AutoCloseable
      Angegeben von:
      close in Schnittstelle ObjectStream<T>
      Löst aus:
      IOException - Thrown if there is an error during closing the stream.