Changes between Version 8 and Version 9 of UsingResources


Ignore:
Timestamp:
05/24/13 11:33:44 (6 years ago)
Author:
welberge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingResources

    v8 v9  
    1212The hmi.util package includes a few helper classes for applying this pattern. 
    1313 
    14  
     14== Use case == 
     15Put resource file like “config.xml” in your project’s resource director, and create a hmi.util.Resource object in your application like so: 
     16{{{ 
     17Resources res = new Resources(""); 
     18}}} 
     19=== Read your config file directly to a String === 
     20{{{ 
     21String configText = res.read("config.xml"); 
     22}}} 
     23=== Open a Java Reader for the config file === 
     24{{{ 
     25BufferedReader configReader = res.getReader("config.xml"); 
     26}}} 
     27=== Open an inputstream for the config file === 
     28{{{ 
     29BufferedInputStream ips = res.getInputStream("config.xml"); 
     30}}} 
    1531= Outdated: resource setup in Elckerlyc = 
    1632For now, see `Hmi\HmiUtil\docs\report\HmiUtilReport.tex` for an explanation.