org.dellroad.stuff.spring
Class ResourceReaderFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<String>
org.dellroad.stuff.spring.ResourceReaderFactoryBean
- All Implemented Interfaces:
- BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<String>, InitializingBean
public class ResourceReaderFactoryBean
- extends AbstractFactoryBean<String>
Spring factory bean that reads in a Spring Resource and converts it to a String.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceReaderFactoryBean
public ResourceReaderFactoryBean()
setResource
public void setResource(Resource resource)
- Configure the resource containing the
value.
setCharacterEncoding
public void setCharacterEncoding(String charset)
- Configure the character encoding for the resource. Default is
UTF-8.
getObjectType
public Class<String> getObjectType()
- Specified by:
getObjectType in interface FactoryBean<String>- Specified by:
getObjectType in class AbstractFactoryBean<String>
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface InitializingBean- Overrides:
afterPropertiesSet in class AbstractFactoryBean<String>
- Throws:
Exception
createInstance
protected String createInstance()
throws IOException
- Specified by:
createInstance in class AbstractFactoryBean<String>
- Throws:
IOException