Package com.oss.asn1

Interface ObjectReader<T>

Type Parameters:
T - type of objects in the object storage.
All Superinterfaces:
AutoCloseable, Closeable

public interface ObjectReader<T> extends Closeable
The ObjectReader interface specifies the functionality to retrieve objects from an ObjectStore object.
Since:
ASN.1/Java 1.4 beta A
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Terminate the reader and release any internal resources that are in use.
    boolean
    Indicate if the storage has some more objects to retrieve.
    Read next object from the storage.
  • Method Details

    • readObject

      T readObject() throws StorageException
      Read next object from the storage. The readObject method gets a copy of the object in storage. Changes to the object retrieved have no effect on the object in storage.
      Returns:
      next object from the storage.
      Throws:
      StorageException - if any error occurs when retrieving the next object or there are no more objects to read.
    • hasMoreObjects

      boolean hasMoreObjects()
      Indicate if the storage has some more objects to retrieve.
      Returns:
      true if there are some objects to read from the storage.
    • close

      void close() throws StorageException
      Terminate the reader and release any internal resources that are in use.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      StorageException - if any error occurs when terminating the reader.