@Override
    public void fromData(DataInput in,
        DeserializationContext context) throws IOException, ClassNotFoundException {
      super.fromData(in, context);
      int length = in.readInt();
      if (length == -1) {
        profiles = null;
      } else {
        Profile[] array = new Profile[length];
        for (int i = 0; i < length; i++) {
          array[i] = DataSerializer.readObject(in);
        }
        profiles = array;
      }
    }
Used to return multiple profiles

@since GemFire 5.7
geode-core/src/main/java/org/apache/geode/internal/cache/UpdateAttributesProcessor.java