1 7 8 package com.sun.imageio.plugins.common; 9 10 import java.io.InputStream ; 11 import java.util.PropertyResourceBundle ; 12 import java.net.URL ; 13 14 26 public class I18NImpl { 27 32 protected static final String getString(String className, String resource_name, String key) { 33 PropertyResourceBundle bundle = null; 34 try { 35 InputStream stream = 36 Class.forName(className).getResourceAsStream(resource_name); 37 bundle = new PropertyResourceBundle (stream); 38 } catch(Throwable e) { 39 throw new RuntimeException (e); } 41 42 return (String )bundle.handleGetObject(key); 43 } 44 } 45 | Popular Tags |