1 21 package oracle.toplink.essentials.internal.helper; 23 24 import java.lang.Class ; 25 import java.lang.ClassNotFoundException ; 26 import java.io.IOException ; 27 import java.io.InputStream ; 28 import java.io.ObjectStreamClass ; 29 import java.io.ObjectInputStream ; 30 import oracle.toplink.essentials.sessions.Session; 31 import oracle.toplink.essentials.internal.helper.ConversionManager; 32 33 42 public class CustomObjectInputStream extends ObjectInputStream { 43 Session m_session; 44 45 public CustomObjectInputStream(InputStream stream, Session session) throws IOException { 46 super(stream); 47 m_session = session; 48 } 49 50 public Class resolveClass(ObjectStreamClass classDesc) throws ClassNotFoundException , IOException { 51 ConversionManager cm = m_session.getDatasourceLogin().getDatasourcePlatform().getConversionManager(); 52 return (Class )cm.convertObject(classDesc.getName(), Class .class); 53 } 54 } 55 | Popular Tags |