@Deprecated public abstract class InputStreamPropertiesLoader extends AbstractPropertiesLoader
Properties 配置文件加载器
有可能造成字符乱码问题!!已废弃!!
这个加载器适用于使用 InputStream 加载资源文件的加载器, 子类必须实现 getInputStream(String resourceFileName) 方法
Properties file loader
It may cause charset problem!! Deprecated!!
This loader uses inputStream to load resource, subclass must implement method getInputStream(String resourceFileName)
Email: fishinlove@163.com
created by 2019/03/28 20:35:59
ReaderPropertiesLoader| 限定符 | 构造器和说明 |
|---|---|
protected |
InputStreamPropertiesLoader(java.lang.String resourceFileName)
已过时。
根据资源文件名称构建
Construct with resource file
|
protected |
InputStreamPropertiesLoader(java.lang.String resourceFileName,
java.lang.String namespace)
已过时。
根据资源文件名称构建
Construct with resource file
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract java.io.InputStream |
getInputStream(java.lang.String resourceFileName)
已过时。
获得输入流
Get inputStream
|
protected java.util.Properties |
loadProperties()
已过时。
这个方法留给子类实现
这里不管子类从哪里获取 Properties,只要保证能获得就行了
This method is abstract, its subclass should implement
|
java.lang.String |
namespace()
已过时。
获取这个加载资源的命名空间
Get the namespace
|
loadprotected InputStreamPropertiesLoader(java.lang.String resourceFileName)
根据资源文件名称构建
Construct with resource file
resourceFileName - 资源文件名称
resource file
protected InputStreamPropertiesLoader(java.lang.String resourceFileName,
java.lang.String namespace)
根据资源文件名称构建
Construct with resource file
resourceFileName - 资源文件名称
resource file
namespace - 指定的命名空间
Appointed namespace
public java.lang.String namespace()
Loadable获取这个加载资源的命名空间
Get the namespace
这个资源的命名空间
The namespace of this resource
protected java.util.Properties loadProperties()
throws java.io.IOException
AbstractPropertiesLoader这个方法留给子类实现
这里不管子类从哪里获取 Properties,只要保证能获得就行了
This method is abstract, its subclass should implement
loadProperties 在类中 AbstractPropertiesLoader返回一个 Properties 对象
Return a Properties instance
java.io.IOException - 如果加载过程出错,比如文件找不到,流创建失败等都有可能导致这个异常
If loading has error or file not found, even inputStream created failed causes this exception
protected abstract java.io.InputStream getInputStream(java.lang.String resourceFileName)
throws java.io.IOException
获得输入流
Get inputStream
resourceFileName - 资源文件名
resource file name
文件输入流
file inputStream
java.io.IOException - 输入流创建错误就会抛出这个异常
If the inputStream created failed
Copyright © 2019. All Rights Reserved.