Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 47 for sank (0.13 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

        require(streamId and 0x80000000.toInt() == 0) { "reserved bit set: $streamId" }
        sink.writeMedium(length)
        sink.writeByte(type and 0xff)
        sink.writeByte(flags and 0xff)
        sink.writeInt(streamId and 0x7fffffff)
      }
    
      @Throws(IOException::class)
      override fun close() {
        this.withLock {
          closed = true
          sink.close()
        }
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  2. 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,
        ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

            @Throws(IOException::class)
            override fun writeTo(sink: BufferedSink) {
              delegate().writeTo(uppercaseSink(sink).buffer())
            }
          }
        return request.newBuilder()
          .method(request.method, uppercaseBody)
          .build()
      }
    
      private fun uppercaseSink(sink: Sink): Sink {
        return object : ForwardingSink(sink) {
          @Throws(IOException::class)
          override fun write(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

    package mockwebserver3.internal
    
    import okio.Buffer
    import okio.Sink
    
    /**
     * A sink that sleeps [periodDelayNanos] every [bytesPerPeriod] bytes. Unlike [okio.Throttler],
     * this permits any interval to be used.
     */
    internal class ThrottledSink(
      private val delegate: Sink,
      private val bytesPerPeriod: Long,
      private val periodDelayNanos: Long,
    ) : Sink by delegate {
      private var bytesWrittenSinceLastDelay = 0L
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  5. 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()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            return original!!.contentLength()
          }
    
          override fun writeTo(sink: BufferedSink) {
            val uppercase = uppercase(sink)
            val bufferedSink = uppercase.buffer()
            original!!.writeTo(bufferedSink)
            bufferedSink.emit()
          }
        }
      }
    
      private fun uppercase(original: BufferedSink): Sink {
        return object : ForwardingSink(original) {
          override fun write(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        server.listener.assertClosing(1000, "Bye!")
        server.webSocket!!.finishReader()
        server.listener.assertClosed(1000, "Bye!")
      }
    
      @Test
      fun emptyCloseInitiatesShutdown() {
        server.sink.write("8800".decodeHex()).emit() // Close without code.
        client.processNextFrame()
        client.listener.assertClosing(1005, "")
        client.webSocket!!.finishReader()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            private var cacheRequestClosed = false
    
            @Throws(IOException::class)
            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
              val bytesRead: Long
              try {
                bytesRead = source.read(sink, byteCount)
              } catch (e: IOException) {
                if (!cacheRequestClosed) {
                  cacheRequestClosed = true
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

            return "text/plain".toMediaTypeOrNull()
          }
    
          @Throws(IOException::class)
          override fun writeTo(sink: BufferedSink) {
            try {
              sink.writeUtf8("abc")
              sink.flush()
              Thread.sleep(sleepMillis.toLong())
              sink.writeUtf8("def")
            } catch (e: InterruptedException) {
              throw InterruptedIOException()
            }
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

          override fun contentType(): MediaType? {
            return null
          }
    
          @Throws(IOException::class)
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8(body)
          }
        }
    
        val expected =
          """
          |--123
          |
          |Quick
          |--123
          |
          |Brown
          |--123
          |
          |Fox
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
Back to top