Given a start key and end key, this method returns a map of items with value converted to UTF-8 string.

@param startKey
@param endKey
@return
193426
public Map<String, String> rangeQueryState(String startKey, String endKey) {
        Map<String, String> retMap = new HashMap<>();
        for (Map.Entry<String, ByteString> item : rangeQueryRawState(startKey, endKey).entrySet()) {
            retMap.put(item.getKey(), item.getValue().toStringUtf8());
        }
        return retMap;
    }
206650
static public String getEnglishString(byte[] data, int start, int end) {
        int len = end - start;
        if (0 >= len || null == data) {
            return null;
        }
        char chars[] = new char[len];
        for (int i = start; i < end; i++) {
            chars[i] = (char) (data[i] & 0xff);
        }
        return new String(chars);
    }
955053
private String processKey(String key) {
        AssertUtils.assertNotNull(key, "Key cannot be null");

        String result = null;

        if (this.isCaseSensitive() == false) {
            result = key.toLowerCase(Locale.ENGLISH);
        } else {
            result = key;
        }

        return result;
    }
301143
public GenericKeys match(String name, int start, int length) {
        if (null == name || 0 == name.length() || start < 0 || length > name.length()) {
            return null;
        }
        KeyBucket bucket = getBucket(name.charAt(start));
        if (null != bucket) {
            return bucket.match(name, start, length);
        }
        return null;
    }
1046692
public String ltrim(Object key, long start, long end) {
		Jedis jedis = getJedis();
		try {
			return jedis.ltrim(keyToBytes(key), start, end);
		}
		finally {close(jedis);}
	}
738070
public void set(final byte[] utf8, final int start, final int len) {
		setCapacity(len, false);
		System.arraycopy(utf8, start, bytes, 0, len);
		this.length = len;
		this.hash = 0;
	}
1015112
private static void checkKey(String key) throws IllegalArgumentException {
		if(key.endsWith(VALIDATED_SUFFIX)) throw new IllegalArgumentException("Key may not end with "+VALIDATED_SUFFIX+": "+key);
		if(key.endsWith(MODIFIED_SUFFIX)) throw new IllegalArgumentException("Key may not end with "+MODIFIED_SUFFIX+": "+key);
	}
255867
public static KeyRange closedClosed(Key start, Key end) {
    return new KeyRange(checkNotNull(start), Endpoint.CLOSED, checkNotNull(end), Endpoint.CLOSED);
  }
488107
public static RubyRange<Character> range(char start, char end) {
    return new RubyRange<>(CharacterSuccessor.getInstance(), start, end,
        Interval.CLOSED);
  }
1303822
public boolean startsWith(final Bits key) {
    if (key.bitLength > this.bitLength) {
      return false;
    }
    final Bits prefix = key.bitLength < this.bitLength ? this.range(0,
      key.bitLength) : this;
    return prefix.compareTo(key) == 0;
  }
1064261
protected function keyForRange($key, \DateTime $start, \DateTime $end)
    {
        return 'range:' . $key . '_' . $this->dateString($start) . '_' . $this->dateString($end);
    }
1052319
public <H,R> Map<String,AttributeValue> convertKey(final T key) {
        final DynamoDBMapperFieldModel<T,H> hk = this.<H>hashKey();
        final DynamoDBMapperFieldModel<T,R> rk = this.<R>rangeKeyIfExists();
        return this.<H,R>convertKey(hk.get(key), (rk == null ? (R)null : rk.get(key)));
    }
441199
public function bitcount($key, $start = null, $end = null) {
        if (isset($start) xor isset($end)) {
            throw new InvalidArgumentException('Start and End must be used together');
        }
        $params = [$key];
        if (isset($start, $end)) {
            $params[] = $start;
            $params[] = $end;
        }
        return $this->returnCommand(['BITCOUNT'], $key, $params);
    }
142882
public void end(String key)
    {
        if (key == null)
        {
            return;
        }
        TimingData data = executionInfo.get(key);
        if (data == null)
        {
            LOG.info("Called end with key: " + key + " without ever calling begin");
            return;
        }
        data.end();
    }
1287405
public int getStartNextPropertyKey(int iIndex, String strMessage)
    {
        for (iIndex = iIndex + 1; iIndex < strMessage.length(); iIndex++)
        {
            char chChar = strMessage.charAt(iIndex);
            if (this.isEndChar(chChar))
                break;
        }
        if (iIndex >= strMessage.length())
            return -1;
        int iNextProperty = strMessage.indexOf(END_OF_KEY_CHAR, iIndex);
        if (iNextProperty == -1)
            return -1;  // Not found
        for (int i = iNextProperty - 1; i >= 0; i--)
        {
            char chChar = strMessage.charAt(i);
            if (this.isEndChar(chChar))
            {   // Key always starts on a new line.
                for (int k = i + 1; k < strMessage.length(); k++)
                {   // Now go forward to the first character.
                    chChar = strMessage.charAt(k);
                    if (!this.isLeadingWhitespace(chChar))
                    {
                        return k;
                    }
                }
            }
        }
        return -1;
    }
383122
public String mkString(String start, String sep, String end) {
		StringBuilder ret = new StringBuilder(start);
		for (int i = 0; i < inner.size(); i++) {
			ret.append(inner.get(i));
			if (i != (inner.size() - 1)) {
				ret.append(sep);
			}
		}
		return ret.append(end).toString();
	}
736542
static String getLazyKey(String key) {
    int start = startOfType(key);
    if (substringStartsWith(key, start, LAZY_PREFIX)) {
      return extractKey(key, start, key.substring(0, start), LAZY_PREFIX);
    } else {
      return null;
    }
  }