@Override
    public Optional<Vertex> readVertex(final InputStream inputStream, final GraphFilter graphFilter) throws IOException {
        StarGraphGryoSerializer serializer = this.graphFilterCache.get(graphFilter);
        if (null == serializer) {
            serializer = StarGraphGryoSerializer.withGraphFilter(graphFilter);
            this.graphFilterCache.put(graphFilter, serializer);
        }
        final Input input = new Input(inputStream);
        this.readHeader(input);
        final StarGraph starGraph = this.kryo.readObject(input, StarGraph.class, serializer);
        // read the terminator
        this.kryo.readClassAndObject(input);
        return Optional.ofNullable(starGraph == null ? null : starGraph.getStarVertex());
    }
Read data into a {@link Graph} from output generated by any of the {@link GryoWriter} {@code writeVertex} or
{@code writeVertices} methods or by {@link GryoWriter#writeGraph(OutputStream, Graph)}.

@param inputStream    a stream containing an entire graph of vertices and edges as defined by the accompanying
                      {@link GraphWriter#writeGraph(OutputStream, Graph)}.
@param graphToWriteTo the graph to write to when reading from the stream.
@throws IOException
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoReader.java