public abstract class PropertiesLoaderUtils extends ObjectSE
java.util.Properties
をロードするための便利なユーティリティメソッドで、入力ストリームの標準処理を実行します。カスタマイズされたエンコーディングのオプションを含む、より設定可能なプロパティの読み込みについては、PropertiesLoaderSupport クラスの使用を検討してください。
PropertiesLoaderSupport
コンストラクターと説明 |
---|
PropertiesLoaderUtils() |
修飾子と型 | メソッドと説明 |
---|---|
static void | fillProperties(PropertiesSE props, EncodedResource resource) 特定の EncodedResource から特定のプロパティを入力し、プロパティファイルの特定のエンコーディングを潜在的に定義します。 |
static void | fillProperties(PropertiesSE props, Resource resource) 特定のリソースから特定のプロパティを入力します(ISO-8859-1 エンコーディング)。 |
static PropertiesSE | loadAllProperties(StringSE resourceName) デフォルトのクラスローダーを使用して、指定されたクラスパスリソース(ISO-8859-1 エンコーディング)からすべてのプロパティをロードします。 |
static PropertiesSE | loadAllProperties(StringSE resourceName, ClassLoaderSE classLoader) 指定されたクラスローダーを使用して、指定されたクラスパスリソース(ISO-8859-1 エンコーディング)からすべてのプロパティをロードします。 |
static PropertiesSE | loadProperties(EncodedResource resource) 指定された EncodedResource からプロパティをロードし、プロパティファイルの特定のエンコーディングを潜在的に定義します。 |
static PropertiesSE | loadProperties(Resource resource) 指定されたリソースからプロパティを読み込みます(ISO-8859-1 エンコーディング)。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static PropertiesSE loadProperties(EncodedResource resource) throws IOExceptionSE
public static void fillProperties(PropertiesSE props, EncodedResource resource) throws IOExceptionSE
props
- ロードする Properties インスタンス resource
- ロード元のリソース IOExceptionSE
- I/O エラーの場合 public static PropertiesSE loadProperties(Resource resource) throws IOExceptionSE
resource
- ロード元のリソース IOExceptionSE
- ロードに失敗した場合 fillProperties(java.util.Properties, Resource)
public static void fillProperties(PropertiesSE props, Resource resource) throws IOExceptionSE
props
- 埋めるプロパティインスタンス resource
- ロード元のリソース IOExceptionSE
- ロードに失敗した場合 public static PropertiesSE loadAllProperties(StringSE resourceName) throws IOExceptionSE
クラスパスで同じ名前のリソースが複数見つかった場合、プロパティをマージします。
resourceName
- クラスパスリソースの名前 IOExceptionSE
- ロードに失敗した場合 public static PropertiesSE loadAllProperties(StringSE resourceName, @Nullable ClassLoaderSE classLoader) throws IOExceptionSE
クラスパスで同じ名前のリソースが複数見つかった場合、プロパティをマージします。
resourceName
- クラスパスリソースの名前 classLoader
- ロードに使用する ClassLoader (またはデフォルトのクラスローダーを使用するには null
)IOExceptionSE
- ロードに失敗した場合