Adding support for LoggingPrintStream.write(byte[]) and friends.

By default, Android's System.out and System.err are implemented by
the AndroidPrintStream subclass of LoggingPrintStream. Until now,
that class has silently discarded the raw bytes it has received.
This causes two problems:

Applications may be accidentally wasting CPU+memory writing to
System.out. By making this output visible, the developers of such
applications can silence the problem at the source.

Application developers may be purposefully writing to these streams
and perplexed by the data's disappearance. For example, the core
library's own java.util.logging.ConsoleHandler sends its log data
into this black hole. By making the data visible, we save the data
and remove an unnecessary sharp edge from our API.
2 files changed