public int encode(ByteBuffer buffer) {
        byte[] loc = Utf8.toBytes(backendString());
        buffer.put(loc);
        return loc.length;
    }
Encodes the location to the given buffer and returns the length.
For internal use.
container-search/src/main/java/com/yahoo/prelude/Location.java