Package org.dellroad.stuff.spring
Class ResourceReaderFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<String>
org.dellroad.stuff.spring.ResourceReaderFactoryBean
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<String>
,InitializingBean
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected String
void
setCharacterEncoding
(String charset) Configure the character encoding for the resource.void
setResource
(Resource resource) Configure the resource containing thevalue
.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
ResourceReaderFactoryBean
public ResourceReaderFactoryBean()
-
-
Method Details
-
setResource
Configure the resource containing thevalue
.- Parameters:
resource
- resource to read
-
setCharacterEncoding
Configure the character encoding for the resource. Default isUTF-8
.- Parameters:
charset
- resource charset
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<String>
- Specified by:
getObjectType
in classAbstractFactoryBean<String>
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classAbstractFactoryBean<String>
- Throws:
Exception
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<String>
- Throws:
IOException
-