다음을 통해 공유


ResourceBundle.Control.NeedsReload Method

Definition

Determines if the expired bundle in the cache needs to be reloaded based on the loading time given by loadTime or some other criteria.

[Android.Runtime.Register("needsReload", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/util/ResourceBundle;J)Z", "GetNeedsReload_Ljava_lang_String_Ljava_util_Locale_Ljava_lang_String_Ljava_lang_ClassLoader_Ljava_util_ResourceBundle_JHandler")]
public virtual bool NeedsReload (string baseName, Java.Util.Locale locale, string format, Java.Lang.ClassLoader loader, Java.Util.ResourceBundle bundle, long loadTime);
[<Android.Runtime.Register("needsReload", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/util/ResourceBundle;J)Z", "GetNeedsReload_Ljava_lang_String_Ljava_util_Locale_Ljava_lang_String_Ljava_lang_ClassLoader_Ljava_util_ResourceBundle_JHandler")>]
abstract member NeedsReload : string * Java.Util.Locale * string * Java.Lang.ClassLoader * Java.Util.ResourceBundle * int64 -> bool
override this.NeedsReload : string * Java.Util.Locale * string * Java.Lang.ClassLoader * Java.Util.ResourceBundle * int64 -> bool

Parameters

baseName
String

the base bundle name of the resource bundle, a fully qualified class name

locale
Locale

the locale for which the resource bundle should be instantiated

format
String

the resource bundle format to be loaded

loader
ClassLoader

the ClassLoader to use to load the bundle

bundle
ResourceBundle

the resource bundle instance that has been expired in the cache

loadTime
Int64

the time when bundle was loaded and put in the cache

Returns

true if the expired bundle needs to be reloaded; false otherwise.

Attributes

Remarks

Determines if the expired bundle in the cache needs to be reloaded based on the loading time given by loadTime or some other criteria. The method returns true if reloading is required; false otherwise. loadTime is a millisecond offset since the <c>Calendar</c> Epoch.

The calling ResourceBundle.getBundle factory method calls this method on the ResourceBundle.Control instance used for its current invocation, not on the instance used in the invocation that originally loaded the resource bundle.

The default implementation compares loadTime and the last modified time of the source data of the resource bundle. If it's determined that the source data has been modified since loadTime, true is returned. Otherwise, false is returned. This implementation assumes that the given format is the same string as its file suffix if it's not one of the default formats, "java.class" or "java.properties".

Java documentation for java.util.ResourceBundle.Control.needsReload(java.lang.String, java.util.Locale, java.lang.String, java.lang.ClassLoader, java.util.ResourceBundle, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to