Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for operator (0.22 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      private val requestedHosts: MutableList<String> = mutableListOf()
      private var nextAddress = 0xff000064L // 255.0.0.100 in IPv4; ::ff00:64 in IPv6.
    
      /** Sets the results for `hostname`.  */
      operator fun set(
        hostname: String,
        addresses: List<InetAddress>,
      ): FakeDns {
        hostAddresses[hostname] = addresses
        return this
      }
    
      /** Clears the results for `hostname`.  */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt

        val buffer = Buffer()
        operator.read(6, buffer, 21)
        operator.read(36, buffer, 1)
        operator.read(5, buffer, 5)
        operator.read(28, buffer, 8)
        operator.read(17, buffer, 10)
        operator.read(36, buffer, 2)
        operator.read(2, buffer, 4)
        operator.write(0, buffer, buffer.size)
        operator.read(0, buffer, 12)
        operator.read(47, buffer, 3)
        operator.read(45, buffer, 2)
    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)
  3. okhttp/src/main/kotlin/okhttp3/Interceptor.kt

         * interceptors.
         *
         * ```kotlin
         * val interceptor = Interceptor { chain: Interceptor.Chain ->
         *     chain.proceed(chain.request())
         * }
         * ```
         */
        inline operator fun invoke(crossinline block: (chain: Chain) -> Response): Interceptor = Interceptor { block(it) }
      }
    
      interface Chain {
        fun request(): Request
    
        @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Headers.kt

        for (i in 0 until namesAndValues.size) {
          result += namesAndValues[i].length.toLong()
        }
    
        return result
      }
    
      override operator fun iterator(): Iterator<Pair<String, String>> = commonIterator()
    
      fun newBuilder(): Builder = commonNewBuilder()
    
      /**
       * Returns true if `other` is a `Headers` object with the same headers, with the same casing, in
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache2/FileOperator.kt

     * this class offers:
     *
     *  * **Read/write:** read and write using the same operator.
     *  * **Random access:** access any position within the file.
     *  * **Shared channels:** read and write a file channel that's shared between
     * multiple operators. Note that although the underlying [FileChannel] may be shared,
     * each [FileOperator] should not be.
     */
    internal class FileOperator(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

          if (file == null) return null
          sourceCount++
        }
    
        return RelaySource()
      }
    
      internal inner class RelaySource : Source {
        private val timeout = Timeout()
    
        /** The operator to read and write the shared file. Null if this source is closed. */
        private var fileOperator: FileOperator? = FileOperator(file!!.channel)
    
    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)
  7. okhttp/src/test/java/okhttp3/internal/idn/IdnStringprep.kt

      val lcatSet: CodePointSet,
    ) {
      /**
       * Returns [input] in canonical form according to these rules, or null if no such canonical form
       * exists for it.
       */
      operator fun invoke(input: String): String? = invoke(Buffer().writeUtf8(input))
    
      internal operator fun invoke(input: BufferedSource): String? {
        // 1. Map.
        val mapResult = Buffer()
        while (!input.exhausted()) {
          val codePoint = input.readUtf8CodePoint()
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt

          val bit = 1 shl INITIAL_WINDOW_SIZE
          return if (bit and set != 0) values[INITIAL_WINDOW_SIZE] else DEFAULT_INITIAL_WINDOW_SIZE
        }
    
      fun clear() {
        set = 0
        values.fill(0)
      }
    
      operator fun set(
        id: Int,
        value: Int,
      ): Settings {
        if (id < 0 || id >= values.size) {
          return this // Discard unknown settings.
        }
    
        val bit = 1 shl id
        set = set or bit
    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)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

      }
    
      /**
       * Returns true if there's another set of routes to attempt. Every address has at least one route.
       */
      operator fun hasNext(): Boolean = hasNextProxy() || postponedRoutes.isNotEmpty()
    
      @Throws(IOException::class)
      operator fun next(): Selection {
        if (!hasNext()) throw NoSuchElementException()
    
        // Compute the next set of routes to attempt.
        val routes = mutableListOf<Route>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt

          override fun encodedValue(url: HttpUrl): String = url.encodedUsername
    
          override operator fun set(
            builder: HttpUrl.Builder,
            value: String,
          ) {
            builder.username(value)
          }
    
          override operator fun get(url: HttpUrl): String = url.username
        },
    
        PASSWORD {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
Back to top