why can I only read 2048 bytes at a time from an okhttp.Response InputStream?
问题 I am downloading a file using an OkHttp GET request: import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; ... OkHttpClient okClient = new OkHttpClient(); Request request = Request.Builder().url(url).get(); Response response = okClient.newCall(request).execute(); I read from the response body and decorating it with a BufferedInputStream , with a buffer size of 4096: BufferedInputStream in = new BufferedInputStream(response.body()