public static String decodeString(Deserializer in) {
        int length = in.getInt(null);
        if (length == 0) {
            return "";
        }
        return Utf8.toString(in.getBytes(null, length));
    }
Reads a string from the given buffer that was previously written by {@link #encodeString(String,
com.yahoo.vespa.objects.Serializer)}.

@param in The byte buffer to read from.
@return The decoded string.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/AbstractRoutableFactory.java