org.xiruss.repository.server.storagemanagement
Class InMemoryStorageObjectData

java.lang.Object
  extended by org.xiruss.repository.server.storagemanagement.StorageObjectDataBase
      extended by org.xiruss.repository.server.storagemanagement.InMemoryStorageObjectData
All Implemented Interfaces:
StorageObjectData

public class InMemoryStorageObjectData
extends StorageObjectDataBase

Storage object data implementation that uses a string buffer to hold the storage object data.


Field Summary
 
Fields inherited from class org.xiruss.repository.server.storagemanagement.StorageObjectDataBase
isOpen, so
 
Constructor Summary
InMemoryStorageObjectData(StorageObject so)
           
 
Method Summary
 void close()
          Closes any open output streams.
 byte[] getBytes()
          Gets all the bytes of the storage object.
 java.io.InputStream getInputStream()
          Gets an input stream from which the storage object data bytes can be read.
 java.io.OutputStream getOutputStream()
          Returns an exclusive output stream to which new data can be written.
 java.io.ByteArrayInputStream getReader()
           
 long size()
          Returns the number of bytes in the storage object.
 
Methods inherited from class org.xiruss.repository.server.storagemanagement.StorageObjectDataBase
getStorageObject, isOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryStorageObjectData

public InMemoryStorageObjectData(StorageObject so)
Method Detail

size

public long size()
Description copied from interface: StorageObjectData
Returns the number of bytes in the storage object.

Returns:

getReader

public java.io.ByteArrayInputStream getReader()
                                       throws java.io.IOException
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Description copied from interface: StorageObjectData
Returns an exclusive output stream to which new data can be written.

Returns:
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from interface: StorageObjectData
Closes any open output streams.

Specified by:
close in interface StorageObjectData
Overrides:
close in class StorageObjectDataBase
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: StorageObjectData
Gets an input stream from which the storage object data bytes can be read.

Returns:
ByteArrayInputStream
Throws:
java.io.IOException

getBytes

public byte[] getBytes()
                throws java.io.IOException
Description copied from interface: StorageObjectData
Gets all the bytes of the storage object.

Returns:
Throws:
java.io.IOException