1 8 9 package com.sleepycat.bind.serial.test; 10 11 import java.io.ObjectStreamClass ; 12 import java.math.BigInteger ; 13 14 import com.sleepycat.je.DatabaseException; 15 import com.sleepycat.bind.serial.ClassCatalog; 16 17 24 class NullClassCatalog implements ClassCatalog { 25 26 private long id = Long.MAX_VALUE; 27 28 public void close() 29 throws DatabaseException { 30 } 31 32 public byte[] getClassID(ObjectStreamClass classFormat) 33 throws DatabaseException { 34 35 return BigInteger.valueOf(id--).toByteArray(); 36 } 37 38 public ObjectStreamClass getClassFormat(byte[] classID) 39 throws DatabaseException, ClassNotFoundException { 40 41 return null; } 43 } 44 | Popular Tags |