text: public static boolean startsWith(byte[] ref, BytesRef prefix) {if (ref.length < prefix.length) {return false;}return Arrays.equals(ref, 0, prefix.length,prefix.bytes, prefix.offset, prefix.offset + prefix.length);}