if (currentPutField == null)
if (currentPutField != null) return currentPutField;  currentPutField = new PutField()
  public PutField putFields() throws IOException  {    if (currentPutField == null)      {	currentPutField = new PutField ()	  {	    private byte[] prim_field_data =	      new byte[currentObjectStreamClass.primFieldSize];	    private Object[] objs =	      new Object[currentObjectStreamClass.objectFieldCount];	    public void put (String name, boolean value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'Z');	      prim_field_data[field.getOffset ()] = (byte)(value ? 1 : 0);	    }	    public void put (String name, byte value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'B');	      prim_field_data[field.getOffset ()] = value;	    }	    public void put (String name, char value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'C');	      int off = field.getOffset ();	      prim_field_data[off++] = (byte)(value >>> 8);	      prim_field_data[off] = (byte)value;	    }	    public void put (String name, double value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'D');	      int off = field.getOffset ();	      long l_value = Double.doubleToLongBits (value);	      prim_field_data[off++] = (byte)(l_value >>> 52);	      prim_field_data[off++] = (byte)(l_value >>> 48);	      prim_field_data[off++] = (byte)(l_value >>> 40);	      prim_field_data[off++] = (byte)(l_value >>> 32);	      prim_field_data[off++] = (byte)(l_value >>> 24);	      prim_field_data[off++] = (byte)(l_value >>> 16);	      prim_field_data[off++] = (byte)(l_value >>> 8);	      prim_field_data[off] = (byte)l_value;	    }	    public void put (String name, float value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'F');	      int off = field.getOffset ();	      int i_value = Float.floatToIntBits (value);	      prim_field_data[off++] = (byte)(i_value >>> 24);	      prim_field_data[off++] = (byte)(i_value >>> 16);	      prim_field_data[off++] = (byte)(i_value >>> 8);	      prim_field_data[off] = (byte)i_value;	    }	    public void put (String name, int value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'I');	      int off = field.getOffset ();	      prim_field_data[off++] = (byte)(value >>> 24);	      prim_field_data[off++] = (byte)(value >>> 16);	      prim_field_data[off++] = (byte)(value >>> 8);	      prim_field_data[off] = (byte)value;	    }	    public void put (String name, long value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'J');	      int off = field.getOffset ();	      prim_field_data[off++] = (byte)(value >>> 52);	      prim_field_data[off++] = (byte)(value >>> 48);	      prim_field_data[off++] = (byte)(value >>> 40);	      prim_field_data[off++] = (byte)(value >>> 32);	      prim_field_data[off++] = (byte)(value >>> 24);	      prim_field_data[off++] = (byte)(value >>> 16);	      prim_field_data[off++] = (byte)(value >>> 8);	      prim_field_data[off] = (byte)value;	    }	    public void put (String name, short value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      checkType (field, 'S');	      int off = field.getOffset ();	      prim_field_data[off++] = (byte)(value >>> 8);	      prim_field_data[off] = (byte)value;	    }	    public void put (String name, Object value)	    {	      ObjectStreamField field		= currentObjectStreamClass.getField (name);	      if (field == null)		throw new IllegalArgumentException ();	      if (value != null &&		  ! field.getType ().isAssignableFrom (value.getClass ()))		throw new IllegalArgumentException ();	      objs[field.getOffset ()] = value;	    }	    public void write (ObjectOutput out) throws IOException	    {	      // Apparently Block data is not used with PutField as per	      // empirical evidence against JDK 1.2.  Also see Mauve test	      // java.io.ObjectInputOutput.Test.GetPutField.	      boolean oldmode = setBlockDataMode (false);	      out.write (prim_field_data);	      for (int i = 0; i < objs.length; ++ i)		out.writeObject (objs[i]);	      setBlockDataMode (oldmode);	    }	    private void checkType (ObjectStreamField field, char type)	      throws IllegalArgumentException	    {	      if (TypeSignature.getEncodingOfClass(field.getType ()).charAt(0)		  != type)		throw new IllegalArgumentException ();	    }	  };      }    return currentPutField;  }