Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 104 for mutableListOf (0.32 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/http/RecordingProxySelector.kt

    import java.net.SocketAddress
    import java.net.URI
    import okhttp3.internal.format
    
    class RecordingProxySelector : ProxySelector() {
      @JvmField val proxies = mutableListOf<Proxy>()
    
      private val requestedUris = mutableListOf<URI>()
      private val failures = mutableListOf<String>()
    
      override fun select(uri: URI): List<Proxy> {
        requestedUris.add(uri)
        return proxies
      }
    
      fun assertRequests(vararg expectedUris: URI?) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

      @Test fun executeScheduledEarlierReplacesRepeatedLater() {
        val task =
          object : Task("task") {
            val schedules = mutableListOf(50.µs)
            val delays = mutableListOf(200.µs, -1)
    
            override fun runOnce(): Long {
              log += "run@${taskFaker.nanoTime}"
              if (schedules.isNotEmpty()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 20K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

    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)
    
      /** Type hints scoped to the call stack, manipulated with [pushTypeHint] and [popTypeHint]. */
      private val typeHintStack = mutableListOf<Any?>()
    
      /**
       * The type hint for the current object. Used to pick adapters based on other fields, such as
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/RecordingOkAuthenticator.kt

    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.Route
    
    class RecordingOkAuthenticator(
      val credential: String?,
      val scheme: String?,
    ) : Authenticator {
      val responses = mutableListOf<Response>()
      val routes = mutableListOf<Route>()
    
      fun onlyResponse() = responses.single()
    
      fun onlyRoute() = routes.single()
    
      @Throws(IOException::class)
      override fun authenticate(
        route: Route?,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. .teamcity/src/main/kotlin/configurations/Gradleception.kt

        stage: Stage,
        buildJvm: Jvm,
        jvmDescription: String,
        bundleGroovy4: Boolean = false,
    ) : BaseGradleBuildType(stage = stage, init = {
        val idParts = mutableListOf<String>()
        val labels = mutableListOf<String>()
        val descriptionParts = mutableListOf<String>()
        if (bundleGroovy4) {
            labels += "Groovy 4.x"
            idParts += "Groovy4"
            descriptionParts += "bundling Groovy 4"
        }
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Tue Feb 27 09:57:17 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

    class JavaNetCookieJar(private val cookieHandler: CookieHandler) : CookieJar {
      override fun saveFromResponse(
        url: HttpUrl,
        cookies: List<Cookie>,
      ) {
        val cookieStrings = mutableListOf<String>()
        for (cookie in cookies) {
          cookieStrings.add(cookieToString(cookie, true))
        }
        val multimap = mapOf("Set-Cookie" to cookieStrings)
        try {
          cookieHandler.put(url.toUri(), multimap)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  7. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

          Mapping(0x40080, 0x400ff, TYPE_DISALLOWED, ByteString.EMPTY),
        )
      }
    
      @Test fun mergeAdjacentDeltaMappedRangesWithMultipleDeltas() {
        assertThat(
          mergeAdjacentDeltaMappedRanges(
            mutableListOf(
              InlineDelta(1, 5),
              InlineDelta(2, 5),
              InlineDelta(3, 5),
              MappedRange.External(4, "a".encodeUtf8()),
            ),
          ),
        ).containsExactly(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

          for (codePoint in dataString.codePoints()) {
            assertThat(codePoint and 0x7f).isEqualTo(codePoint)
          }
        }
    
        // Confirm the sections are increasing.
        val rangesIndices = mutableListOf<Int>()
        val rangesOffsets = mutableListOf<Int>()
        for (i in 0 until compactTable.sections.length step 4) {
          rangesIndices += compactTable.sections.read14BitInt(i)
          rangesOffsets += compactTable.sections.read14BitInt(i + 2)
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  9. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

        val resource =
          HpackJsonUtil::class.java.getResource("/hpack-test-case")
            ?: return arrayOf()
    
        val testCaseDirectory = File(resource.toURI()).toOkioPath()
        val result = mutableListOf<String>()
        for (path in fileSystem.list(testCaseDirectory)) {
          val story00 = path / "story_00.json"
          if (!fileSystem.exists(story00)) continue
          try {
            readStory(story00)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

      // State for negotiating the next socket address to use.
      private var inetSocketAddresses = emptyList<InetSocketAddress>()
    
      // State for negotiating failed routes
      private val postponedRoutes = mutableListOf<Route>()
    
      init {
        resetNextProxy(address.url, address.proxy)
      }
    
      /**
       * Returns true if there's another set of routes to attempt. Every address has at least one route.
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
Back to top