@Override
    public <T> T deserialize(final ByteBuffer byteBuffer, final ClassTag<T> classTag) {
        this.input.setBuffer(byteBuffer.array());
        return this.gryoSerializer.getGryoPool().readWithKryo(kryo -> (T) kryo.readClassAndObject(this.input));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoSerializerInstance.java