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
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected StringvoidsetCharacterEncoding(String charset) Configure the character encoding for the resource.voidsetResource(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:
getObjectTypein interfaceFactoryBean<String>- Specified by:
getObjectTypein classAbstractFactoryBean<String>
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classAbstractFactoryBean<String>- Throws:
Exception
-
createInstance
- Specified by:
createInstancein classAbstractFactoryBean<String>- Throws:
IOException
-