1 8 package org.ozoneDB.core.storage.gammaStore; 9 10 import java.io.IOException ; 11 import java.io.InputStream ; 12 import java.io.ObjectInputStream ; 13 import java.io.ObjectStreamClass ; 14 import java.io.StreamCorruptedException ; 15 16 20 public class GammaObjectInputStream extends ObjectInputStream { 21 22 private ObjectStreamClasses objectStreamClasses; 23 24 public GammaObjectInputStream(InputStream in, ObjectStreamClasses objectStreamClasses) throws IOException { 25 super(in); 26 this.objectStreamClasses = objectStreamClasses; 27 } 28 29 protected ObjectStreamClass readClassDescriptor() throws IOException , ClassNotFoundException { 30 int handle = readInt(); 31 ObjectStreamClass result = objectStreamClasses.getObjectStreamClass(handle); 32 if (result == null) { 33 throw new ClassNotFoundException ("unknown class descriptor (" + handle + ")"); 34 } 35 return result; 36 } 37 38 protected void readStreamHeader() throws IOException , StreamCorruptedException { 39 } 40 41 } | Popular Tags |