@Override
    public void read(SpanList spanList) {
        byte type = buf.get();
        if (type != SpanList.ID) {
            throw new DeserializationException("Cannot deserialize SpanList with type " + type);
        }
        List<SpanNode> nodes = readSpanList();
        for (SpanNode node : nodes) {
            spanList.add(node);
        }
    }
Class used for de-serializing documents on the Vespa 6.x document format.

@author baldersheim
document/src/main/java/com/yahoo/document/serialization/VespaDocumentDeserializer6.java