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);}

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 ) ; }
public static bool StartsWith(BytesRef @ref, BytesRef prefix) {return SliceEquals(@ref, prefix, 0);}
