static Object readObjectFrom(Input input, Schema<?> schema, Object owner,
            IdStrategy strategy) throws IOException
    {
        final int number = input.readFieldNumber(schema);
        final boolean mapped;
        switch (number)
        {
            case ID_ARRAY:
                mapped = false;
                break;

            case ID_ARRAY_MAPPED:
                mapped = true;
                break;

            default:
                throw new ProtostuffException("Corrupt input.");
        }

        final ArrayWrapper mArrayWrapper = ObjectSchema.newArrayWrapper(input,
                schema, mapped, strategy);

        if (input instanceof GraphInput)
        {
            // update the actual reference.
            ((GraphInput) input).updateLast(mArrayWrapper.array, owner);
        }

        strategy.COLLECTION_SCHEMA.mergeFrom(input, mArrayWrapper);

        return mArrayWrapper.array;
    }
Used when a field is an array (Object[] or any polymorphic component type).

@author David Yu
@created Apr 25, 2012
protostuff-runtime/src/main/java/io/protostuff/runtime/ArraySchema.java