private void readObject(ObjectInputStream in) throws IOException {
        setLevel(Level.parse(in.readUTF()));
        setLoggerName(in.readUTF());
        setMessage(in.readUTF());
        setMillis(in.readLong());
        final Object[] params = new Object[in.readInt()];
        for (int i = 0; i < params.length; i++) {
            try {
                params[i] = in.readObject();
            } catch (ClassNotFoundException ex) {
                logger.log(Level.SEVERE, "Unable to deserialize record parameter "
                        + i + " because the class was not found.", ex);
                params[i] = new Object(); //no body likes NPE's
            }
        }
        setResourceBundleName(in.readUTF());
        setSequenceNumber(in.readLong());
        setSourceClassName(in.readUTF());
        setSourceMethodName(in.readUTF());
        setThreadID(in.readInt());
        try {
            setThrown((Throwable) in.readObject());
        } catch (ClassNotFoundException ex) {
            logger.log(Level.SEVERE, "Unable to deserialize thrown record field, "
                    + "class was not found.", ex);
        }
        final int numFields = in.readInt();
        for (int i = 0; i < numFields; i++) {
            final String name = in.readUTF();
            final String value = in.readUTF();
            fields.put(name, (value.contentEquals(CONST_NULL) ? null : value));
        }
    }