@Override
    protected Edge readValue(final Buffer buffer, final GraphBinaryReader context) throws IOException {
        final Object id = context.read(buffer);
        // reading single string value for now according to GraphBinaryV4
        final String label = (String) context.readValue(buffer, List.class, false).get(0);

        final Object inVId = context.read(buffer);
        // reading single string value for now according to GraphBinaryV4
        final String inVLabel = (String) context.readValue(buffer, List.class, false).get(0);
        final Object outVId = context.read(buffer);
        // reading single string value for now according to GraphBinaryV4
        final String outVLabel = (String) context.readValue(buffer, List.class, false).get(0);

        // discard the parent vertex
        context.read(buffer);

        final List<Property> properties = context.read(buffer);

        final DetachedVertex inV = DetachedVertex.build().setId(inVId).setLabel(inVLabel).create();
        final DetachedVertex outV = DetachedVertex.build().setId(outVId).setLabel(outVLabel).create();

        final DetachedEdge.Builder builder = DetachedEdge.build().setId(id).setLabel(label).setInV(inV).setOutV(outV);

        if (properties != null) {
            for (final Property p : properties) {
                builder.addProperty(p);
            }
        }

        return builder.create();
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/EdgeSerializer.java