code: public static <T> void writeList(List<T> items, ObjectDataOutput out) throws IOException {
          writeCollection(items, out);
      }
docs: Writes a list to an {@link ObjectDataOutput}. The list's size is written
  to the data output, then each object in the list is serialized.
  
  @param items list of items to be serialized
  @param out   data output to write to
  @param <T>   type of items
  @throws NullPointerException if {@code items} or {@code out} is {@code null}
  @throws IOException when an error occurs while writing to the output