Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for copyFor (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              }
    
              // The buffer has the data we need. Read from there and return immediately.
              val bytesToRead = minOf(byteCount, upstreamPos - sourcePos)
              buffer.copyTo(sink, sourcePos - bufferPos, bytesToRead)
              sourcePos += bytesToRead
              return bytesToRead
            }
    
          // Read from the file.
          if (source == SOURCE_FILE) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

                if (!cacheRequestClosed) {
                  cacheRequestClosed = true
                  cacheBody.close() // The cache response is complete!
                }
                return -1
              }
    
              sink.copyTo(cacheBody.buffer, sink.size - bytesRead, bytesRead)
              cacheBody.emitCompleteSegments()
              return bytesRead
            }
    
            override fun timeout(): Timeout = source.timeout()
    
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

      comparator: Comparator<String>,
    ): Int = indexOfFirst { comparator.compare(it, value) == 0 }
    
    @Suppress("UNCHECKED_CAST")
    internal fun Array<String>.concat(value: String): Array<String> {
      val result = copyOf(size + 1)
      result[result.lastIndex] = value
      return result as Array<String>
    }
    
    /** Increments [startIndex] until this string is not ASCII whitespace. Stops at [endIndex]. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/internal/BufferMockResponseBody.kt

    }
    
    internal class BufferMockResponseBody(
      val buffer: Buffer,
    ) : MockResponseBody {
      override val contentLength = buffer.size
    
      override fun writeTo(sink: BufferedSink) {
        buffer.copyTo(sink.buffer)
        sink.emitCompleteSegments()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

            nameBuf.writeByte(utf8ByteCount.toInt())
            nameBuf.writeUtf8(label)
          }
          nameBuf.writeByte(0) // end
    
          nameBuf.copyTo(this, 0, nameBuf.size)
          writeShort(type)
          writeShort(1) // CLASS_IN
        }.readByteString()
    
      @Throws(Exception::class)
      fun decodeAnswers(
        hostname: String,
        byteString: ByteString,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

     * signatures.
     */
    fun Buffer.isProbablyUtf8(): Boolean {
      try {
        val prefix = Buffer()
        val byteCount = size.coerceAtMost(64)
        copyTo(prefix, 0, byteCount)
        for (i in 0 until 16) {
          if (prefix.exhausted()) {
            break
          }
          val codePoint = prefix.readUtf8CodePoint()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt

          apply {
            require(tls) { "no cipher suites for cleartext connections" }
            require(cipherSuites.isNotEmpty()) { "At least one cipher suite is required" }
    
            this.cipherSuites = cipherSuites.copyOf() as Array<String> // Defensive copy.
          }
    
        fun allEnabledTlsVersions() =
          apply {
            require(tls) { "no TLS versions for cleartext connections" }
            this.tlsVersions = null
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 13.4K bytes
    - Viewed (0)
Back to top