static String midToKey(String mid) { int pos = mid.indexOf('='); if (pos >= 0 && pos < mid.length - 1) return mid.substring(pos + 1); return mid; }