Code example for PropertyResourceBundle

0
            stream = loader.getResourceAsStream(resourceName);
        } 
        if (stream != null) {
            try { 
                // Only this line is changed to make it to read properties files as UTF-8. 
                bundle = new PropertyResourceBundle(new InputStreamReader(stream, "UTF-8"));
            } finally { 
                stream.close();
            } 
        } 
        return bundle;
    } 
}