Search in sources :

Example 91 with BufferedSink

use of okio.BufferedSink in project java by kubernetes-client.

the class ProgressRequestBody method writeTo.

@Override
public void writeTo(BufferedSink sink) throws IOException {
    BufferedSink bufferedSink = Okio.buffer(sink(sink));
    requestBody.writeTo(bufferedSink);
    bufferedSink.flush();
}
Also used : BufferedSink(okio.BufferedSink)

Aggregations

BufferedSink (okio.BufferedSink)91 Test (org.junit.Test)31 IOException (java.io.IOException)30 Buffer (okio.Buffer)19 File (java.io.File)15 RequestBody (okhttp3.RequestBody)14 GzipSink (okio.GzipSink)12 Source (okio.Source)11 Response (okhttp3.Response)10 BufferedSource (okio.BufferedSource)10 Request (okhttp3.Request)9 InFrame (okhttp3.internal.http2.MockHttp2Peer.InFrame)9 MediaType (okhttp3.MediaType)7 InterruptedIOException (java.io.InterruptedIOException)6 MockResponse (okhttp3.mockwebserver.MockResponse)5 Sink (okio.Sink)5 InputStream (java.io.InputStream)4 Socket (java.net.Socket)4 OkHttpClient (okhttp3.OkHttpClient)4 Request (com.squareup.okhttp.Request)3