@Override
        public void write(final Kryo kryo, final Output output, final IoX iox) {
            final Map<String,Object> props = new HashMap<>();
            addSingleProperty("x", iox.toString(), props);
            final DetachedVertex vertex = new DetachedVertex(100, Vertex.DEFAULT_LABEL, props);
            try (final OutputStream stream = new ByteArrayOutputStream()) {
                final Output detachedOutput = new Output(stream);
                kryo.writeObject(detachedOutput, vertex);

                // have to remove the first byte because it marks a reference we don't want to have as this
                // serializer is trying to "act" like a DetachedVertex
                final byte[] b = detachedOutput.toBytes();
                output.write(b, 1, b.length - 1);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
Converts an {@link IoX} to a {@link DetachedVertex}.
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoXIoRegistry.java