- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 3,137 for sink (0.04 sec)
-
okhttp/src/test/java/okhttp3/internal/io/FaultyFileSystem.kt
} override fun appendingSink( file: Path, mustExist: Boolean, ): Sink = FaultySink(super.appendingSink(file, mustExist), file) override fun sink( file: Path, mustCreate: Boolean, ): Sink = FaultySink(super.sink(file, mustCreate), file) inner class FaultySink(sink: Sink, private val file: Path) : ForwardingSink(sink) { override fun write( source: Buffer, byteCount: Long, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSourceTest.java
TestCharSink sink = new TestCharSink(); assertFalse(sink.wasStreamOpened() || sink.wasStreamClosed()); assertEquals(STRING.length(), source.copyTo(sink)); assertTrue(source.wasStreamOpened() && source.wasStreamClosed()); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); assertEquals(STRING, sink.getString()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 11.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheRequest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 769 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
private object SlowRequestBody : RequestBody() { override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) { for (i in 0 until 50) { sink.writeUtf8("abc") sink.flush() Thread.sleep(100) } fail("") } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
Http1ExchangeCodec(client, this, source, sink) } } @Throws(SocketException::class) internal fun newWebSocketStreams(exchange: Exchange): RealWebSocket.Streams { val socket = this.socket!! val source = this.source!! val sink = this.sink!! socket.soTimeout = 0 noNewExchanges() return object : RealWebSocket.Streams(true, source, sink) { override fun close() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
/** * Returns a sink that can be used to write data to the peer. * * @throws IllegalStateException if this stream was initiated by the peer and a [writeHeaders] has * not yet been sent. */ fun getSink(): Sink { this.withLock { check(hasResponseHeaders || isLocallyInitiated) { "reply before requesting the sink" } } return sink }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 23.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
fun writeTo(editor: DiskLruCache.Editor) { editor.newSink(ENTRY_METADATA).buffer().use { sink -> sink.writeUtf8(url.toString()).writeByte('\n'.code) sink.writeUtf8(requestMethod).writeByte('\n'.code) sink.writeDecimalLong(varyHeaders.size.toLong()).writeByte('\n'.code) for (i in 0 until varyHeaders.size) { sink.writeUtf8(varyHeaders.name(i)) .writeUtf8(": ")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxy.kt
private fun transfer( fromAddress: InetAddress, toAddress: InetAddress, source: BufferedSource, sink: BufferedSink, ) { executor.execute { val name = "SocksProxy $fromAddress to $toAddress" threadName(name) { val buffer = Buffer() try { sink.use { source.use { while (true) { val byteCount = source.read(buffer, 8192L)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt
randomAccessFile!!.getChannel().force(false) val source = file!!.source().buffer() return source.readByteString() } private fun write(data: ByteString) { val sink = file!!.sink().buffer() sink.write(data) sink.close() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
} override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<el") sink.flush() throw IOException("failed to stream the XML") } } class ValidRequestBody : RequestBody() { override fun contentType(): MediaType { return "application/xml".toMediaType() } override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<element/>")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0)