code: public static <E> void marshallArray(E[] array, ObjectOutput out) throws IOException {
        final int size = array == null ? NULL_VALUE : array.length;
        marshallSize(out, size);
        if (size <= 0) {
           return;
        }
        for (int i = 0; i < size; ++i) {
           out.writeObject(array[i]);
        }
     }
docs: Marshall arrays.
  <p>
  This method supports {@code null} {@code array}.
  
  @param array Array to marshall.
  @param out   {@link ObjectOutput} to write.
  @param <E>   Array type.
  @throws IOException If any of the usual Input/Output related exceptions occur.