public static Pair < Integer , Integer > getUtf8Range ( final byte [ ] buffer , final int offset , final int length ) { final int start = getUtf8ByteStart ( buffer , offset ) ; final int end = getUtf8ByteEnd ( buffer , offset + length - 1 ) ; return new Pair <> ( start , end - start + 1 ) ; }
Returns first and length .