static Utf8Array parseNullTerminatedString(ByteBuffer buf) throws DeserializationException {
        //search for 0-byte
        int end = getFirstNullByte(buf);

        if (end == -1) {
            throw new DeserializationException("Could not locate terminating 0-byte for string");
        }

        return parseNullTerminatedString(buf, end - buf.position());
    }
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