Class OSSObjectStorage

All Implemented Interfaces:
ObjectStorage, Storage, Serializable, Cloneable

public class OSSObjectStorage extends OSSFileStorage implements ObjectStorage
Implements external storage for the data whose contents is an array of Objects.
ASN.1/Java 1.4-beta A
See Also:
  • Constructor Details

    • OSSObjectStorage

      public OSSObjectStorage()
      The default constructor. Bypasses to the default constructor of the superclass, that creates a temporary file and associates the file with this storage object.
    • OSSObjectStorage

      public OSSObjectStorage(File file)
      Create an OSSObjectStorage object and associate it with an existing disk file.
      file - disk file to associate with this storage object.
      StorageException - if the specified file does not exist or is not an ordinary (normal) file.
  • Method Details

    • getKind

      public int getKind()
      Identify the kind of storage this object implements.
      Specified by:
      getKind in interface Storage
    • getReader

      public ObjectReader getReader() throws StorageException
      Return an ObjectReader to read the contents of the storage.
      Specified by:
      getReader in interface ObjectStorage
      an ObjectReader.
      StorageException - if read access to the contents was denied.
    • getWriter

      public ObjectWriter getWriter(boolean append) throws StorageException
      Return an ObjectWriter to modify the contents of the storage. This implementation of the ObjectStorage does not support the append operation. If the append parameter is true a StorageException is thrown.
      Specified by:
      getWriter in interface ObjectStorage
      append - this parameter must be set to false.
      an ObjectWriter.
      StorageException - if write access to the contents was denied or append mode has been requested by the caller.