code: public static <E> void marshallCollection(Collection<E> collection, ObjectOutput out) throws IOException {
        marshallCollection(collection, out, ObjectOutput::writeObject);
     }
docs: Marshall a {@link Collection}.
  <p>
  This method supports {@code null} {@code collection}.
  
  @param collection {@link Collection} to marshal.
  @param out        {@link ObjectOutput} to write.
  @param <E>        Collection's element type.
  @throws IOException If any of the usual Input/Output related exceptions occur.