Class PropertiesUtil

java.lang.Object
org.keycloak.theme.PropertiesUtil

public class PropertiesUtil extends Object
Author:
Hiroyuki Wada
  • Constructor Details

    • PropertiesUtil

      public PropertiesUtil()
  • Method Details

    • readCharsetAware

      public static void readCharsetAware(Properties properties, InputStream stream) throws IOException
      Read a properties file either UTF-8 or if that doesn't work in ISO-8895-1 format. This utilizes the functionality present in JDK 9 to automatically detect the encoding of the resource. A user can specify the standard Java system property java.util.PropertyResourceBundle.encoding to change this.

      Unfortunately the standard Properties.load(Reader) doesn't support this automatic decoding, as it is only been implemented for resource files.

      Throws:
      IOException
      See Also: