private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException {
        objectOutputStream.defaultWriteObject();

        objectOutputStream.writeInt(fields.size());

        for (final Map.Entry<String, Serializable> entry : fields.entrySet()) {
            objectOutputStream.writeObject(entry.getKey());
            objectOutputStream.writeObject(entry.getValue());
        }
    }
private void writeObject ( final ObjectOutputStream objectOutputStream ) throws IOException { objectOutputStream . defaultWriteObject ( ) ; objectOutputStream . writeInt ( fields . size ( ) ) ; for ( final Map . Entry < String , Serializable > entry : fields . entrySet ( ) ) { objectOutputStream . writeObject ( entry . getKey ( ) ) ; objectOutputStream . writeObject ( entry . getValue ( ) ) ; } }
@param objectOutputStream The output stream
@serialData Writes out the standard fields, then the number of non-standard fields {@code int}, followed by
the non-standard field names alternated with their values