net.ontopia.infoset.content
Interface ContentStoreIF

All Known Implementing Classes:
FileContentStore, InMemoryContentStore, JDBCContentStore, JDBCSequenceContentStore

public interface ContentStoreIF

INTERNAL: A simple content store interface that stores chunks of data associated with an integer key. The underlying implementation is responsible for creating the keys.


Method Summary
 int add(ContentInputStream data)
          INTERNAL: Creates an entry for the specified data value.
 int add(java.io.InputStream data, int length)
          INTERNAL: Creates an entry for the specified data value.
 void close()
          INTERNAL: Closes the content store.
 boolean containsKey(int key)
          INTERNAL: Returns true if the content store contains an entry with the specified key.
 ContentInputStream get(int key)
          INTERNAL: Gets the data value associated with the specified key.
 boolean remove(int key)
          INTERNAL: Removes the entry associated with the key.
 

Method Detail

containsKey

boolean containsKey(int key)
                    throws ContentStoreException
INTERNAL: Returns true if the content store contains an entry with the specified key.

Throws:
ContentStoreException

get

ContentInputStream get(int key)
                       throws ContentStoreException
INTERNAL: Gets the data value associated with the specified key.

Throws:
ContentStoreException

add

int add(ContentInputStream data)
        throws ContentStoreException
INTERNAL: Creates an entry for the specified data value.

Throws:
ContentStoreException

add

int add(java.io.InputStream data,
        int length)
        throws ContentStoreException
INTERNAL: Creates an entry for the specified data value.

Throws:
ContentStoreException

remove

boolean remove(int key)
               throws ContentStoreException
INTERNAL: Removes the entry associated with the key. If the key is not present the call has no effect.

Returns:
true if the key was present; false otherwise
Throws:
ContentStoreException

close

void close()
           throws ContentStoreException
INTERNAL: Closes the content store. This allows all internal resources to be released.

Throws:
ContentStoreException


Copyright © 2000-2012 Ontopia.