mirror of https://github.com/grpc/grpc-java.git
OutputStreamAdapter is a private class, and is only ever called by two places: ByteStreams.copy, which never calls the single byte method, and DrainTo, which potentially can. There are two classes that implement DrainTo, which is primarily ProtoInputStream. It calls MessageLite.writeTo(OutputStream) or back again to ByteStreams.copy. MessageLite.writeTo in turn wraps the OutputStream in a CodedOutputStream.OutputStreamEncoder, which then never calls the single byte version. Thus, all know implementations never call the single byte override. Additionally, it is well known that the single byte write is slow, and is expected to be wrapped in a BufferedOutputStream if there are many small writes. |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||