currentPutField = null;
  private void callWriteMethod(Object obj, ObjectStreamClass osc)    throws IOException  {    Class klass = osc.forClass();    try      {	Class classArgs[] = {ObjectOutputStream.class};	Method m = getMethod(klass, "writeObject", classArgs);	Object args[] = {this};	m.invoke(obj, args);	      }    catch (NoSuchMethodException nsme)      {	// Nothing.      }    catch (InvocationTargetException x)      {        /* Rethrow if possible. */	Throwable exception = x.getTargetException();	if (exception instanceof RuntimeException)	  throw (RuntimeException) exception;	if (exception instanceof IOException)	  throw (IOException) exception;	IOException ioe	  = new IOException("Exception thrown from writeObject() on " +			    klass + ": " + exception.getClass().getName());	ioe.initCause(exception);	throw ioe;      }    catch (Exception x)      {	IOException ioe	  = new IOException("Failure invoking writeObject() on " +			    klass + ": " + x.getClass().getName());	ioe.initCause(x);	throw ioe;      }  }