49 import java.lang.ref.WeakReference;
50 import java.lang.reflect.Constructor;
51 import java.lang.reflect.InvocationTargetException;
52 import java.lang.reflect.Modifier;
53 import java.net.JarURLConnection;
54 import java.net.URL;
55 import java.net.URLConnection;
56 import java.security.AccessController;
57 import java.security.PrivilegedAction;
58 import java.security.PrivilegedActionException;
59 import java.security.PrivilegedExceptionAction;
60 import java.util.concurrent.ConcurrentHashMap;
61 import java.util.concurrent.ConcurrentMap;
62 import java.util.jar.JarEntry;
63 import java.util.spi.ResourceBundleControlProvider;
64 import java.util.spi.ResourceBundleProvider;
65 import java.util.stream.Collectors;
66 import java.util.stream.Stream;
67
68 import jdk.internal.loader.BootLoader;
69 import jdk.internal.misc.JavaUtilResourceBundleAccess;
70 import jdk.internal.misc.SharedSecrets;
71 import jdk.internal.reflect.CallerSensitive;
72 import jdk.internal.reflect.Reflection;
73 import sun.security.action.GetPropertyAction;
74 import sun.util.locale.BaseLocale;
75 import sun.util.locale.LocaleObjectCache;
76 import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
77
78
79 /**
80 *
81 * Resource bundles contain locale-specific objects. When your program needs a
82 * locale-specific resource, a <code>String</code> for example, your program can
83 * load it from the resource bundle that is appropriate for the current user's
84 * locale. In this way, you can write program code that is largely independent
85 * of the user's locale isolating most, if not all, of the locale-specific
86 * information in resource bundles.
87 *
88 * <p>
89 * This allows you to write programs that can:
90 * <UL>
|
49 import java.lang.ref.WeakReference;
50 import java.lang.reflect.Constructor;
51 import java.lang.reflect.InvocationTargetException;
52 import java.lang.reflect.Modifier;
53 import java.net.JarURLConnection;
54 import java.net.URL;
55 import java.net.URLConnection;
56 import java.security.AccessController;
57 import java.security.PrivilegedAction;
58 import java.security.PrivilegedActionException;
59 import java.security.PrivilegedExceptionAction;
60 import java.util.concurrent.ConcurrentHashMap;
61 import java.util.concurrent.ConcurrentMap;
62 import java.util.jar.JarEntry;
63 import java.util.spi.ResourceBundleControlProvider;
64 import java.util.spi.ResourceBundleProvider;
65 import java.util.stream.Collectors;
66 import java.util.stream.Stream;
67
68 import jdk.internal.loader.BootLoader;
69 import jdk.internal.access.JavaUtilResourceBundleAccess;
70 import jdk.internal.access.SharedSecrets;
71 import jdk.internal.reflect.CallerSensitive;
72 import jdk.internal.reflect.Reflection;
73 import sun.security.action.GetPropertyAction;
74 import sun.util.locale.BaseLocale;
75 import sun.util.locale.LocaleObjectCache;
76 import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
77
78
79 /**
80 *
81 * Resource bundles contain locale-specific objects. When your program needs a
82 * locale-specific resource, a <code>String</code> for example, your program can
83 * load it from the resource bundle that is appropriate for the current user's
84 * locale. In this way, you can write program code that is largely independent
85 * of the user's locale isolating most, if not all, of the locale-specific
86 * information in resource bundles.
87 *
88 * <p>
89 * This allows you to write programs that can:
90 * <UL>
|