Code example for ObjectStreamClass

Methods: getName

0
 
    	@Override 
	protected Class<?> resolveClass(ObjectStreamClass osc)
	throws IOException, ClassNotFoundException { 
	    Class<?> c = output.classQueue.poll();
	    String expected = osc.getName();
	    String found = (c == null) ? null : c.getName();
	    if (!expected.equals(found)) {
		throw new InvalidClassException("Classes desynchronized: " +
			"found " + found + " when expecting " + expected);
	    } 
	    return c;
	} 
 
    	@Override 
    	protected Class<?> resolveProxyClass(String[] interfaceNames)
	throws IOException, ClassNotFoundException { 
    	    return output.classQueue.poll();
    	} 
    } 
}