- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 45 for BufferedSink (0.22 sec)
-
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 Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.5K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxy.kt
import java.util.logging.Logger import okhttp3.TestUtil.threadFactory import okhttp3.internal.and import okhttp3.internal.closeQuietly import okhttp3.internal.threadName import okio.Buffer import okio.BufferedSink import okio.BufferedSource import okio.buffer import okio.sink import okio.source import okio.use /** * A limited implementation of SOCKS Protocol Version 5, intended to be similar to MockWebServer.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.7K 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 okhttp3.ExperimentalOkHttpApi 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. */ @ExperimentalOkHttpApi
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 1.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
import okhttp3.internal.chooseCharset import okhttp3.internal.commonContentLength import okhttp3.internal.commonIsDuplex import okhttp3.internal.commonIsOneShot import okhttp3.internal.commonToRequestBody import okio.BufferedSink import okio.ByteString import okio.FileSystem import okio.GzipSink import okio.Path import okio.buffer import okio.source abstract class RequestBody {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 25 14:41:37 UTC 2024 - 9.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-RequestBodyCommon.kt
* limitations under the License. */ @file:Suppress("ktlint:standard:filename") package okhttp3.internal import okhttp3.MediaType import okhttp3.RequestBody import okio.BufferedSink import okio.ByteString fun ByteArray.commonToRequestBody( contentType: MediaType?, offset: Int, byteCount: Int, ): RequestBody { checkOffsetAndCount(size.toLong(), offset.toLong(), byteCount.toLong())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt
import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody import okio.BufferedSink class PostStreaming { private val client = OkHttpClient() fun run() { val requestBody = object : RequestBody() { override fun contentType() = MEDIA_TYPE_MARKDOWN override fun writeTo(sink: BufferedSink) { sink.writeUtf8("Numbers\n") sink.writeUtf8("-------\n")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
import okhttp3.Headers.Companion.headersOf import okhttp3.MediaType.Companion.toMediaType import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody import okio.Buffer import okio.BufferedSink import okio.utf8Size import org.junit.jupiter.api.Test class MultipartBodyTest { @Test fun onePartRequired() { assertFailsWith<IllegalStateException> { MultipartBody.Builder().build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.4K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/BufferMockResponseBody.kt
import okio.Buffer import okio.BufferedSink internal fun Buffer.toMockResponseBody(): MockResponseBody { val defensiveCopy = clone() return BufferMockResponseBody(defensiveCopy) } internal class BufferMockResponseBody( val buffer: Buffer, ) : MockResponseBody { override val contentLength = buffer.size override fun writeTo(sink: BufferedSink) { buffer.copyTo(sink.buffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 07 16:05:34 UTC 2024 - 1.1K 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 { return delegate }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0)