code: private void checkUTF8(ByteBuffer buf, int position, int length) throws UnsupportedEncodingException {
          int limit = position + length;
          for (int i = position; i < limit; i++) {
              checkUTF8(buf.get(i));
          }
      }
docs: Check if the given ByteBuffer contains non UTF-8 data.
  
  @param buf           the ByteBuffer to check
  @param position      the index in the {@link ByteBuffer} to start from
  @param length        the number of bytes to operate on
  @throws UnsupportedEncodingException     is thrown if non UTF-8 data is found