mirror of
https://github.com/square/okhttp.git
synced 2025-11-24 18:41:06 +03:00
Sort more imports and wrap documentation at 100 columns.
This is a mechanical refactoring. The only thing I had trouble with is IntelliJ's weak support for `<ul>` tags in Javadoc.
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
*/
|
||||
package okhttp3.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import okhttp3.ResponseBody;
|
||||
import okhttp3.Request;
|
||||
import java.io.IOException;
|
||||
import okio.Buffer;
|
||||
import okio.BufferedSource;
|
||||
import okio.ForwardingSource;
|
||||
@@ -52,7 +52,7 @@ public final class Progress {
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Response response = client.newCall(request).execute();
|
||||
@@ -94,6 +94,7 @@ public final class Progress {
|
||||
private Source source(Source source) {
|
||||
return new ForwardingSource(source) {
|
||||
long totalBytesRead = 0L;
|
||||
|
||||
@Override public long read(Buffer sink, long byteCount) throws IOException {
|
||||
long bytesRead = super.read(sink, byteCount);
|
||||
// read() returns the number of bytes read, or -1 if this source is exhausted.
|
||||
|
||||
Reference in New Issue
Block a user