Charset (String charsetName) { if (charsetName.startsWith(NAME_PREFIX)) { Native2AsciiCharset cached = cache.get(charsetName); if (cached == null) { cached = new Native2AsciiCharset(charsetName); Native2AsciiCharset prev = cache.putIfAbsent(charsetName, cached); if (prev != null) cached = prev; } return cached; } return null; }