com.sleepycat.bind.serial

Class StoredClassCatalog

public class StoredClassCatalog extends Object implements ClassCatalog

A ClassCatalog that is stored in a Database.

A single StoredClassCatalog object is normally used along with a set of databases that stored serialized objects.

Constructor Summary
StoredClassCatalog(Database database)
Creates a catalog based on a given database.
Method Summary
voidclose()
ObjectStreamClassgetClassFormat(byte[] classID)
byte[]getClassID(ObjectStreamClass classFormat)

Constructor Detail

StoredClassCatalog

public StoredClassCatalog(Database database)
Creates a catalog based on a given database. To save resources, only a single catalog object should be used for each unique catalog database.

Parameters: database an open database to use as the class catalog. It must be a BTREE database and must not allow duplicates.

Throws: DatabaseException if an error occurs accessing the database. IllegalArgumentException if the database is not a BTREE database or if it configured to allow duplicates.

Method Detail

close

public void close()

getClassFormat

public ObjectStreamClass getClassFormat(byte[] classID)

getClassID

public byte[] getClassID(ObjectStreamClass classFormat)