docs: public static <E> void marshallCollection(Collection<E> collection, ObjectOutput out, ElementWriter<E> writer) throws IOException {
        final int size = collection == null ? NULL_VALUE : collection.size();
        marshallSize(out, size);
        if (size <= 0) {
           return;
        }
        for (E e : collection) {
           writer.writeTo(out, e);
        }
     }