/*[deutsch]
<p>Implementierungsmethode des Interface {@link Externalizable}. </p>

@param   in      input stream
@throws  IOException in case of I/O-problems
@throws  ClassNotFoundException if class-loading fails
550316
@Override
    public void readExternal(ObjectInput in)
        throws IOException, ClassNotFoundException {

        int header = in.readByte();

        switch (header) {
            case NEGATIVE_DAY_OF_MONTH_PATTERN_TYPE:
                this.obj = readPattern(in);
                break;
            default:
                throw new StreamCorruptedException("Unknown serialized type.");
        }

    }
939869
public void readObject (ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        if (!classDefinesElementType()) {
            @SuppressWarnings("unchecked") Class<E> elementType =
                (Class<E>)Class.forName(in.readUTF());
            _elementType = elementType;

        } else if (_elementType == null) {
            throw new RuntimeException("No element type defined in constructor.");
        }
        initContents();
        in.read(_contents);

        // count set bits to initialize size
        for (byte b : _contents) {
            _size += Integer.bitCount(b & 0xFF);
        }
    }
1273505
public static void copy(final InputStream in, final OutputStream out)
			throws IOException {
		copy(in, out, DEFAULT_BUFFER_SIZE);
	}
1096460
@Override
    public void readObject (ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        in.defaultReadObject();
        _contents = new byte[in.readInt()];
        in.read(_contents);
    }
1370710
public void readExternal(ObjectInput in) throws IOException,
                                            ClassNotFoundException {
        super.readExternal( in );
        sink = (ObjectSinkPropagator) in.readObject();
        alphaNodeHashingThreshold = in.readInt();
        source = ( ObjectSource ) in.readObject();
    }
202330
public static java.lang.reflect.Method read(ObjectInput in)
            throws ClassNotFoundException, NoSuchMethodException, IOException {
        Class cl;
        Class[] types;
        String name;

        cl = ClassRef.read(in);
        if (cl == null) {
            return null;
        } else {
            name = (String) in.readUTF();
            types = ClassRef.readClasses(in);
            return cl.getMethod(name, types);
        }
    }
1011335
@Override public void readExternal( ObjectInput ois )  throws IOException, ClassNotFoundException {
    int x = ois.readInt();
    byte[] buf = MemoryManager.malloc1(x);
    ois.readFully(buf);
    read(new AutoBuffer(buf));
  }
648714
private static void inflater(InputStream in, OutputStream out) {
		final InflaterOutputStream ios = (out instanceof InflaterOutputStream) ? (InflaterOutputStream) out : new InflaterOutputStream(out, new Inflater(true));
		IoUtil.copy(in, ios);
		try {
			ios.finish();
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
375175
public void readObject (ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        _size = in.readInt();
        _values = new int[Math.max(_size, DEFAULT_CAPACITY)];
        for (int ii = 0; ii < _size; ii++) {
            _values[ii] = in.readInt();
        }
    }
245393
private void readObject(java.io.ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        in.defaultReadObject();
        _cache=new HashMap();
    }
135128
@Override
    public void readExternal(ObjectInput s) throws IOException, ClassNotFoundException {
        super.readExternal(s);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Deserializing " + this);
        }
    }
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);
    }
1131880
private void readObject(ObjectInputStream in) throws ClassNotFoundException, NoSuchMethodException, IOException {
        result = ClassRef.read(in);
        arg = ClassRef.read(in);
        name = in.readUTF();
    }
402883
private void readObject(java.io.ObjectInputStream in)
                    throws IOException,
                    ClassNotFoundException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "readObject : " + this); // d468174

        ivAbstractJPAComponent = (AbstractJPAComponent) JPAAccessor.getJPAComponent();

        ivPuRefId = (JPAPuId) in.readObject();
        ivJ2eeName = (J2EEName) in.readObject(); // d510184
        ivRefName = (String) in.readObject(); // d510184
        ivProperties = (Map<?, ?>) in.readObject();
        ivUnsynchronized = in.readBoolean();

        //F743-16027 - using JPAAccessor to get JPAComponent, rather than using cached (possibly stale) static reference
        ivPuInfo = ivAbstractJPAComponent.findPersistenceUnitInfo(ivPuRefId); // F743-18776
        ivTxKeyPuId = ivPuInfo.getPuId(); // d689596

        // Obtain reference to the pool again.                             d510184
        ivEntityManagerPool = ivPuInfo.getEntityManagerPool(ivJ2eeName,
                                                            ivRefName,
                                                            ivProperties);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "readObject : " + this);
    }
664234
private void readObject(final ObjectInputStream inp) throws IOException, ClassNotFoundException {
        inp.defaultReadObject();
        table = new Entry[inp.readInt()];
        threshold = (int) (table.length * loadFactor);
        queue = new ReferenceQueue();
        Object key = inp.readObject();
        while (key != null) {
            final Object value = inp.readObject();
            put(key, value);
            key = inp.readObject();
        }
    }
646669
@Trivial
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        GetField fields = in.readFields();
        failure = (Throwable) fields.get(FAILURE, null);
        params = (String[]) fields.get(PARAMS, new String[] {});
        reason = fields.get(REASON, (short) 0);
    }
816387
@SuppressWarnings("unchecked")
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
        _functions = (Map<String, Function>) in.readObject();
    }