Class CharsetCache


  • public class CharsetCache
    extends java.lang.Object
    Cache for Charset instances.
    • Constructor Summary

      Constructors 
      Constructor Description
      CharsetCache()
      Creates a new CharsetCache and pre-populates it with the initial charsets.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.charset.Charset getCharset​(java.lang.String charsetName)
      Retrieves the charset for the given name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CharsetCache

        public CharsetCache()
        Creates a new CharsetCache and pre-populates it with the initial charsets.
    • Method Detail

      • getCharset

        public java.nio.charset.Charset getCharset​(java.lang.String charsetName)
        Retrieves the charset for the given name.
        Parameters:
        charsetName - the name of the charset
        Returns:
        the charset, or null if not available