It appears BeanIO requires I provide setters for my fields. Is this necessary? I created a BeanIO writer, I intend only to write files, and I have getters for each field - why would I need setters?
If your beans are only meant to be serialized (i.e. used by a BeanWriter), you can declare your stream as mode="write". This will cause BeanIO to look for getters but not setters.
The reference guide states that:
By default, a stream mapping can be used for both reading input streams and writing output streams, called
readwritemode. Setting mode to read orwrite instead, respectively restricts usage to aBeanReaderor aBeanWriteronly, but relaxes some validations on the mapping configuration.When
modeis set toread, a bean class does not require getter methods.When
modeis set towrite, a bean class may be abstract or an interface, and does not require setter methods.