Class OSSObjectStorage

java.lang.Object
com.oss.storage.OSSFileStorage
com.oss.storage.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.
Since:
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.
      Parameters:
      file - disk file to associate with this storage object.
      Throws:
      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
      Returns:
      StorageManager.STORAGE_OBJECTS.
    • getReader

      public ObjectReader getReader() throws StorageException
      Return an ObjectReader to read the contents of the storage.
      Specified by:
      getReader in interface ObjectStorage
      Returns:
      an ObjectReader.
      Throws:
      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
      Parameters:
      append - this parameter must be set to false.
      Returns:
      an ObjectWriter.
      Throws:
      StorageException - if write access to the contents was denied or append mode has been requested by the caller.