1 57 58 package org.apache.wsif.base; 59 60 import java.io.*; 61 62 77 class WSIFObjectInputStream extends ObjectInputStream { 78 90 WSIFObjectInputStream (InputStream in) 91 throws IOException, StreamCorruptedException { 92 93 super(in); 94 } 95 119 protected Class resolveClass(ObjectStreamClass v) 120 throws IOException, ClassNotFoundException { 121 122 try { 123 return Class.forName(v.getName(), true, Thread.currentThread().getContextClassLoader()); 125 } catch (ClassNotFoundException xcpt) { 126 String className = v.getName() ; 127 if (className.equals("boolean")) { return boolean.class; } 128 if (className.equals("char")) { return char.class; } 129 if (className.equals("byte")) { return byte.class; } 130 if (className.equals("short")) { return short.class; } 131 if (className.equals("int")) { return int.class; } 132 if (className.equals("long")) { return long.class; } 133 if (className.equals("float")) { return float.class; } 134 if (className.equals("double")) { return double.class; } 135 136 throw xcpt; 137 } 138 } 139 } 140 | Popular Tags |