What could be causing the first read to return 1179 bytes? Some sort of file header?
对于您正在阅读的响应,HTTP标头为869字节.
Why are reads from the InputStream being paged to a size of 2048 bytes, instead of the value specified by the BufferedInputStream wrapper?
你必须在BufferedInputStream中挖掘,找出为什么它没有连接两个页面.
来自OkHttp的InputStream正在处理2048个块,因为它使用它们的池来节省分配.
Is there a way to configure the OkHttpClient to read more than 2048 bytes from the buffer?
没有.
根据您正在做的事情,您通常可以更好地使用来自response.body().source()的BufferedSource,而不是使用BufferedInputStream.您可以在Okio repo上了解有关它们的更多信息.