Generic is irrelevant.
So to answer my question with the link you posted, the docker stream is binary. InputStream is better than Reader for this reason. However, as the encoding of the stream is documented, this is just punting the problem of how to decode back to callers. Please add a TODO to return a better type than inputstream with the link you mentioned.