1) In many cases preferable can be overriding toString() or providing a similar method to convert ... internals into text. The advantage for user of such method is flexibility. For instance, if the consumer of such method can:
- Save it as a part of some POJO to database
- Incorporate it as a field into some JSON object
- Save to a stream
- Save it to a writer
It can be disadvantage in some cases, e.g. when the text representation is relatively big (like 100 MB) and there are many requests simultaneously that produce such objects. This can require too much resources (CPU, RAM). In such case direct writing to a stream or to a writer can be preferable.
2) If you expect that you object can be used in many different contexts, then it makes sense to provide both, saving to a stream and saving to a writer. For instance, HttpServletResponse provides both, getWriter() and getOutputStream(), so that everyone can decide what is better in the his particular case. Or Jackson's JsonFactory provides methods * createGenerator()* for File, OutputStream and Writer, giving the consumer much freedom.