Code example for ObjectStreamClass

Methods: getName

0
 
	@Override 
	protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException,
			ClassNotFoundException { 
		try { 
			return current.loadClass(desc.getName());
		} 
		catch (ClassNotFoundException e) {
			return super.resolveClass(desc);
		} 
	} 
 
	public void addClass(final String name, final byte[] defn) {
		current = new ClassLoader(current) {
			@Override 
			protected Class<?> findClass(String className)
					throws ClassNotFoundException { 
				if (className.equals(name)) {
					Class<?> result = defineClass(name, defn, 0, defn.length);
					return result;
				} else {