/*
(non-Javadoc)
@see java.io.Externalizable#readExternal(java.io.ObjectInput)
558084
public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException {
		if(logger.isDebugEnabled()) {
        	logger.debug("readExternal");
        }
		sipFactoryImpl = (SipFactoryImpl) in.readObject();
		String sessionKeyString = in.readUTF();
		if(logger.isDebugEnabled()) {
        	logger.debug("readExternal - sessionKeyString=" + sessionKeyString);
        }
		if (sessionKeyString.length() > 0) {
			try {
				sessionKey = SessionManagerUtil.parseSipSessionKey(sessionKeyString);
				if(logger.isDebugEnabled()) {
		        	logger.debug("readExternal - sessionKey=" + sessionKey);
		        }
			} catch (ParseException e) {
				throw new IllegalArgumentException("SIP Sesion Key " + sessionKeyString + " previously serialized could not be reparsed", e);
			}
		}
		int attributesSize = in.readInt();
		if(attributesSize > 0) {
			Object[][] attributesArray = (Object[][] )in.readObject();
			attributes = new ConcurrentHashMap<String, Object>();
			for (int i = 0; i < attributesSize; i++) {
				String key = (String) attributesArray[0][i];
				Object value = attributesArray[1][i];
				attributes.put(key, value);
			}
		}
		if(in.readBoolean()) {
			transactionApplicationData = (TransactionApplicationData) in.readObject();
		}
		headerForm = HeaderForm.valueOf(in.readUTF());
		currentApplicationName = in.readUTF();
		if(currentApplicationName.equals("")) {
			currentApplicationName = null;
		}
		isMessageSent = in.readBoolean();
		if(ReplicationStrategy.EarlyDialog == StaticServiceHolder.sipStandardService.getReplicationStrategy()) {
			transactionId = in.readUTF();
			if (logger.isDebugEnabled()) {
				logger.debug("readExternal transactionId = " + transactionId);
			}
			if(transactionId != null) {
				if(transactionId.equals("")) {
					transactionId = null;
				} else {
					transactionType = in.readBoolean();
					if (logger.isDebugEnabled()) {
						logger.debug("readExternal transactionType = " + transactionType);
					}
				}
			}
		}
	}
94042
public void readExternal(java.io.ObjectInput in)
        throws java.io.IOException, ClassNotFoundException
    {
        HashMap map = (HashMap)in.readObject();
        this.putAll(map);
    }
477245
public void writeExternal(ObjectOutput out) throws IOException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "writeExternal");

        try {

            // write magic
            out.writeShort(EXTERNAL_MAGIC);
            out.writeShort(MAJOR_VERSION);
            out.writeShort(MINOR_VERSION);

            // write the interface type (HOME or REMOTE)
            if (_isHome) {
                out.writeByte(IF_HOME);
            } else {
                out.writeByte(IF_REMOTE);
            }

            //89554
            // write the Java EE name
            writeExternalJ2EEName(out);

            // write the external primary key
            writeExternalPKey(out);
            out.flush();

        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "writeExternal");
        }
    }
133284
@Override
    public void readExternal(PofReader reader) throws IOException {
        factory  = (Factory<List<E>>) reader.readObject(0);
        delegate = factory.create();
        reader.readCollection(1, delegate);
    }
1315496
public void readExternal(PofReader reader)
            throws IOException {
        super.readExternal(reader);
        numInc = (Number) reader.readObject(10);
        fPostInc = reader.readBoolean(11);
    }
969947
@SuppressWarnings("unchecked")
    void read(ObjectInputStream in) throws ClassNotFoundException, IOException {
        GetField fields = in.readFields();

        internalPropNames = (Set<String>) fields.get(INTERNAL_PROP_NAMES, null);

        byte[] bytes = (byte[]) fields.get(OBJECT, null);

        // TODO: for internal usage, find a way to supply the class loader of the bundle that creates the contextual object?

        DeserializationObjectInputStream doin = new DeserializationObjectInputStream(
                        new ByteArrayInputStream(bytes),
                        AccessController.doPrivileged(getThreadContextClassLoader));
        object = (T) doin.readObject();
        doin.close();

        Map<String, String> execProps = (Map<String, String>) fields.get(EXEC_PROPS, null);

        bytes = (byte[]) fields.get(CONTEXT, null);
        threadContextDescriptor = (ThreadContextDescriptorImpl) ThreadContextDeserializer.deserialize(bytes, execProps);
    }
121347
public static java.lang.reflect.Constructor read(ObjectInput in) throws ClassNotFoundException, IOException, NoSuchMethodException {
        Class cl;
        Class[] types;

        cl = ClassRef.read(in);
        if (cl == null) {
            return null;
        } else {
            types = ClassRef.readClasses(in);
            return cl.getConstructor(types);
        }
    }
323004
public void readExternal(java.io.ObjectInput objectInput
                    )
                                    throws java.io.IOException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "readExternal"
                        , "objectInput=" + objectInput + "(java.io.ObjectInput)"
                            );

        byte version = objectInput.readByte();
        if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
            trace.debug(cclass,
                        "readExternal",
                        "version=" + version + "(byte)");

        objectStoreIdentifier = objectInput.readInt();
        storedObjectIdentifier = objectInput.readLong();

        // Re-establish the objectStore storing the ManagedObject.
        try {
            objectStore = ((ManagedObjectInputStream) objectInput).objectManagerState.getObjectStore(objectStoreIdentifier);

        } catch (ObjectManagerException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, "readExternal", exception, "1:488:1.14");
            java.io.IOException ioException = new java.io.IOException();

            // We cannot always invoke initCause, because JCLRM does not support this. 
            // ioException.initCause(exception);
            try {
                java.lang.reflect.Method initCauseMethod = Throwable.class.getMethod("initCause",
                                                                                     new Class[] { Throwable.class });
                initCauseMethod.invoke(this,
                                       new Object[] { exception });
            } catch (Exception exception2) {
                // No FFDC Code Needed.
                if (Tracing.isAnyTracingEnabled() && trace.isEventEnabled())
                    trace.event(this,
                                cclass,
                                "readExternal",
                                exception2);
            }

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass
                           , "readExternal"
                           , new Object[] { exception, new Integer(objectStoreIdentifier) }
                                );
            throw ioException;
        } // catch (ObjectManagerException exception).

        // ManagedObjectInputStream resolves the Token constructed into the definitive token.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "readExternal"
                            );
    }
406675
@Override
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException {

        ChronoHistory history;
        AncientJulianLeapYears ajly;
        byte header = in.readByte();

        switch ((header & 0xFF) >> 4) {
            case VERSION_1:
                history = this.readHistory(in, header);
                break;
            case VERSION_2:
                history = this.readHistory(in, header);
                ajly = readTriennalState(in);
                if (ajly != null) {
                    history = history.with(ajly);
                }
                break;
            case VERSION_3:
                history = this.readHistory(in, header);
                ajly = readTriennalState(in);
                if (ajly != null) {
                    history = history.with(ajly);
                }
                history = history.with(NewYearStrategy.readFromStream(in));
                history = history.with(EraPreference.readFromStream(in));
                break;
            default:
                throw new StreamCorruptedException("Unknown serialized type.");
        }

        this.obj = history;

    }
480279
@Override
    public void readExternal(PofReader reader) throws IOException {
        nodeName = reader.readString(0);
        namespace = reader.readString(1);
    }
183333
static ZoneOffsetTransition readExternal(DataInput in) throws IOException {
        long epochSecond = Ser.readEpochSec(in);
        ZoneOffset before = Ser.readOffset(in);
        ZoneOffset after = Ser.readOffset(in);
        if (before.equals(after)) {
            throw new IllegalArgumentException("Offsets must not be equal");
        }
        return new ZoneOffsetTransition(epochSecond, before, after);
    }
486933
@Override
    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "De-serializing into: " + this);
        }
        super.readExternal(input);
        deserializeMethod(input);
        deserializeScheme(input);
        this.myURIBytes = readByteArray(input);
        setQueryString(readByteArray(input));
    }
962697
@Override
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeByte(type);
        switch (type) {
            case BIG_MONEY: {
                BigMoney obj = (BigMoney) object;
                writeBigMoney(out, obj);
                return;
            }
            case MONEY: {
                Money obj = (Money) object;
                writeBigMoney(out, obj.toBigMoney());
                return;
            }
            case CURRENCY_UNIT: {
                CurrencyUnit obj = (CurrencyUnit) object;
                writeCurrency(out, obj);
                return;
            }
        }
        throw new InvalidClassException("Joda-Money bug: Serialization broken");
    }
1087771
@Override
  public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    int k_max = knnDistances.length;
    out.writeInt(k_max);
    for(int i = 0; i < k_max; i++) {
      out.writeDouble(knnDistances[i]);
    }
  }
368346
void writeExternal(DataOutput out) throws IOException {
        Ser.writeEpochSec(toEpochSecond(), out);
        Ser.writeOffset(offsetBefore, out);
        Ser.writeOffset(offsetAfter, out);
    }
1161663
@Override
    public void writeExternal(ObjectOutput s) throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "writeExternal(ObjectOutput)");
        }
        convertBufferIfNeeded();
        super.writeExternal(s);
    }
50985
public void readExternal(PofReader reader)
            throws IOException {
        name = reader.readString(0);
        last = reader.readLong(1);
    }