- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 49 for BufferedSink (0.06 sec)
-
samples/guide/src/main/java/okhttp3/recipes/UploadProgress.java
public long contentLength() throws IOException { return delegate.contentLength(); } @Override public void writeTo(BufferedSink sink) throws IOException { BufferedSink bufferedSink = Okio.buffer(sink(sink)); delegate.writeTo(bufferedSink); bufferedSink.flush(); } public Sink sink(Sink sink) { return new ForwardingSink(sink) { private long totalBytesWritten = 0L;
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 4.2K bytes - Viewed (1) -
samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 17:01:12 UTC 2025 - 3.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
import okhttp3.MediaType import okhttp3.RequestBody import okio.BufferedSink import org.junit.jupiter.api.Assertions.assertTrue /** A duplex request body that keeps the provided sinks so they can be written to later. */ class AsyncRequestBody : RequestBody() { private val requestBodySinks: BlockingQueue<BufferedSink> = LinkedBlockingQueue() override fun contentType(): MediaType? = null
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/RequestBody.kt
package okhttp3 import java.io.File import java.io.FileDescriptor import java.io.FileInputStream import java.io.IOException import okhttp3.internal.checkOffsetAndCount import okhttp3.internal.chooseCharset import okio.BufferedSink import okio.ByteString import okio.FileSystem import okio.Path import okio.source abstract class RequestBody { /** Returns the Content-Type header for this body. */ abstract fun contentType(): MediaType?
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import java.io.IOException import okio.BufferedSink open class ForwardingRequestBody( delegate: RequestBody?, ) : RequestBody() { private val delegate: RequestBody fun delegate(): RequestBody = delegate
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt
* limitations under the License. */ package okhttp3 import java.io.IOException import okhttp3.Interceptor.Chain import okio.Buffer import okio.BufferedSink import okio.ForwardingSink import okio.Sink import okio.buffer /** Rewrites the request body sent to the server to be all uppercase. */ class UppercaseRequestInterceptor : Interceptor {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.9K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt
* limitations under the License. */ package okhttp3.tls.internal.der import java.math.BigInteger import okio.Buffer import okio.BufferedSink import okio.ByteString internal class DerWriter( sink: BufferedSink, ) { /** A stack of buffers that will be concatenated once we know the length of each. */ private val stack = mutableListOf(sink)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 5.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/FormBody.kt
import okhttp3.internal.toImmutableList import okhttp3.internal.url.FORM_ENCODE_SET import okhttp3.internal.url.canonicalizeWithCharset import okhttp3.internal.url.percentDecode import okio.Buffer import okio.BufferedSink class FormBody internal constructor( encodedNames: List<String>, encodedValues: List<String>, ) : RequestBody() { private val encodedNames: List<String> = encodedNames.toImmutableList()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponseBody.kt
* See the License for the specific language governing permissions and * limitations under the License. * */ package mockwebserver3 import java.io.IOException import okio.BufferedSink /** * The body of a [MockResponse]. * * Unlike [okhttp3.ResponseBody], this interface is designed to be implemented by writers and not * called by readers. */ public interface MockResponseBody {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 14 16:09:26 UTC 2025 - 1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/GzipRequestBody.kt
import okhttp3.RequestBody import okio.BufferedSink import okio.GzipSink import okio.buffer internal class GzipRequestBody( val delegate: RequestBody, ) : RequestBody() { override fun contentType() = delegate.contentType() // We don't know the compressed length in advance! override fun contentLength() = -1L override fun writeTo(sink: BufferedSink) { GzipSink(sink).buffer().use(delegate::writeTo)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 04 17:43:43 UTC 2025 - 1.1K bytes - Viewed (0)