@Override
    public void write(final Kryo kryo, final Output output, final WrappedArray<T> iterable) {
        output.writeVarInt(iterable.size(), true);
        JavaConversions.asJavaCollection(iterable).forEach(t -> {
            kryo.writeClassAndObject(output, t);
        });
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/WrappedArraySerializer.java