public class BeanIOStreamFactory extends Object implements FactoryBean
StreamFactory
instances for
BeanIO item readers and writers. Using a shared StreamFactory can improve
performance by preventing mapping files from being loaded more than once when
multiple item readers and writers are repeatedly invoked or share the same mapping
configuration.StreamFactory
,
BeanIOFlatFileItemReader
,
BeanIOFlatFileItemWriter
Constructor and Description |
---|
BeanIOStreamFactory() |
Modifier and Type | Method and Description |
---|---|
protected StreamFactory |
createStreamFactory()
Creates a new
StreamFactory and loads configured stream mapping resources. |
StreamFactory |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setStreamMappings(List<Resource> streamMappings)
Sets the list of mapping files to load into this stream factory.
|
public StreamFactory getObject() throws Exception
getObject
in interface FactoryBean
Exception
protected StreamFactory createStreamFactory() throws IOException, BeanIOConfigurationException
StreamFactory
and loads configured stream mapping resources.BeanIOConfigurationException
- if a stream mapping resource does not exist
or is invalidIOException
- if an I/O error occurspublic Class<?> getObjectType()
getObjectType
in interface FactoryBean
public boolean isSingleton()
isSingleton
in interface FactoryBean