- All Implemented Interfaces:
- Closeable, Flushable, Appendable, AutoCloseable
public class OutputStreamWriter
extends Writer
natively convert char output into byte output
<2do> - this needs to be reworked. It trades locks for saving heap objects,
and that is a choice between a rock and a hard place. We shouldn't call
write() from within the native encode() (which we would have to since this
could be any OutputStream). We shouldn't create a very short
living JPF byte[] object per write() call, since that kills the heap. We
shouldn't use an explicit lock since that blows up the state space. That
leaves us with atomic sections, but it's not really safe since clients
might use their own OutputStream classes with synchronized write() methods.
At least this would not go unnoticed