Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 121 for whale (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

     *
     * Typical use loops over the parts in sequence:
     *
     * ```kotlin
     * val response: Response = call.execute()
     * val multipartReader = MultipartReader(response.body!!)
     *
     * multipartReader.use {
     *   while (true) {
     *     val part = multipartReader.nextPart() ?: break
     *     process(part.headers, part.body)
     *   }
     * }
     * ```
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

    ) : Sink by delegate {
      private var bytesWrittenSinceLastDelay = 0L
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        var bytesLeft = byteCount
    
        while (bytesLeft > 0) {
          if (bytesWrittenSinceLastDelay == bytesPerPeriod) {
            flush()
            sleepNanos(periodDelayNanos)
            bytesWrittenSinceLastDelay = 0
          }
    
    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)
  3. okhttp/src/test/java/okhttp3/RecordingExecutor.kt

        val actualUrls = calls.map { it.request.url.toString() }
        assertThat(actualUrls).containsExactly(*expectedUrls)
      }
    
      fun finishJob(url: String) {
        val i = calls.iterator()
        while (i.hasNext()) {
          val call = i.next()
          if (call.request.url.toString() == url) {
            i.remove()
            dispatcherTest.dispatcher.finishedAccessor(call)
            return
          }
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

      private val readyQueues = mutableListOf<TaskQueue>()
    
      private val runnable: Runnable =
        object : Runnable {
          override fun run() {
            var incrementedRunCallCount = false
            while (true) {
              val task =
                ******@****.***ck {
                  if (!incrementedRunCallCount) {
                    incrementedRunCallCount = true
                    runCallCount++
                  }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

          print("$host: ")
          System.out.flush()
          try {
            val results = dns.lookup(host)
            println(results)
          } catch (uhe: UnknownHostException) {
            var e: Throwable? = uhe
            while (e != null) {
              println(e)
              e = e.cause
            }
          }
        }
        println()
      }
      time = System.currentTimeMillis() - time
      println("Time: ${time.toDouble() / 1000} seconds\n")
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  6. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

      }
    
      /**
       * Reads stories named "story_xx.json" from the folder provided.
       */
      fun readStories(testFolderName: String): List<Story> {
        val result = mutableListOf<Story>()
        var i = 0
        while (true) { // break after last test.
          val storyResourceName =
            String.format(
              "/hpack-test-case/%s/story_%02d.json",
              testFolderName,
              i,
            )
          val storyInputStream =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. samples/slack/src/main/java/okhttp3/slack/SlackClient.java

        this.session = session;
        this.notifyAll();
      }
    
      /** Waits for an OAuth session for this client to be set. */
      public synchronized void awaitAccessToken(Timeout timeout) throws InterruptedIOException {
        while (session == null) {
          timeout.waitUntilNotified(this);
        }
      }
    
      /** Starts a real time messaging session. */
      public void startRtm() throws IOException {
        String accessToken;
        synchronized (this) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        } else {
          Long.MAX_VALUE
        }
      timeout().deadlineNanoTime(nowNs + minOf(originalDurationNs, timeUnit.toNanos(duration.toLong())))
      return try {
        val skipBuffer = Buffer()
        while (read(skipBuffer, 8192) != -1L) {
          skipBuffer.clear()
        }
        true // Success! The source has been exhausted.
      } catch (_: InterruptedIOException) {
        false // We ran out of time before exhausting the source.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. docs/features/caching.md

    cache.evictAll()
    ```
    
    Removing individual items can be done using the urls iterator.
    This would be typical after a user initiates a force refresh by a pull to refresh type action.
    
    ```java
        val urlIterator = cache.urls()
        while (urlIterator.hasNext()) {
          if (urlIterator.next().startsWith("https://www.google.com/")) {
            urlIterator.remove()
          }
        }
    ```
    
    ### Troubleshooting
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

         */
        private fun build(actualSSLSocketClass: Class<in SSLSocket>): AndroidSocketAdapter {
          var possibleClass: Class<in SSLSocket>? = actualSSLSocketClass
          while (possibleClass != null && possibleClass.simpleName != "OpenSSLSocketImpl") {
            possibleClass = possibleClass.superclass
    
            if (possibleClass == null) {
              throw AssertionError(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top