Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 70 for exhausted (0.17 sec)

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

        // Write each byte into a new buffer, then clone it so that the segments are shared.
        // Shared segments cannot be compacted so we'll get a long chain of short segments.
        val result = Buffer()
        while (!buffer.exhausted()) {
          val box = Buffer()
          box.write(buffer, 1)
          result.write(box.copy(), 1)
        }
        return result
      }
    
      tailrec fun File.isDescendentOf(directory: File): Boolean {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/IteratorTester.java

     *
     * <p>The value you pass to the parameter {@code steps} should be greater than the length of your
     * iterator, so that this class can check that your iterator behaves correctly when it is exhausted.
     *
     * <p>For example, to test {@link java.util.Collections#unmodifiableList(java.util.List)
     * Collections.unmodifiableList}'s iterator:
     *
     * <pre>{@code
     * List<String> expectedElements =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

        }
    
        /**
         * Returns a value in [0..maxByteCount] with the number of bytes that can be read from [source] in
         * the current part. If this returns 0 the current part is exhausted; otherwise it has at least
         * one byte left to read.
         */
        private fun currentPartBytesRemaining(maxResult: Long): Long {
          source.require(crlfDashDashBoundary.size.toLong())
    
    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)
  4. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      fun setChunkedBody(
        body: Buffer,
        maxChunkSize: Int,
      ) = apply {
        removeHeader("Content-Length")
        headersBuilder.add(CHUNKED_BODY_HEADER)
    
        val bytesOut = Buffer()
        while (!body.exhausted()) {
          val chunkSize = minOf(body.size, maxChunkSize.toLong())
          bytesOut.writeHexadecimalUnsignedLong(chunkSize)
          bytesOut.writeUtf8("\r\n")
          bytesOut.write(body, chunkSize)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        @Throws(IOException::class, InterruptedException::class)
        private fun processOneRequest(
          socket: Socket,
          source: BufferedSource,
          sink: BufferedSink,
        ): Boolean {
          if (source.exhausted()) {
            return false // No more requests on this socket.
          }
    
          val request = readRequest(socket, source, sink, sequenceNumber)
          atomicRequestCount.incrementAndGet()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

                    return;
                  } else {
                    // Increment the run counter to avoid the ABA problem of a submitter marking the
                    // thread as QUEUED after it already ran and exhausted the queue before returning
                    // from execute().
                    workerRunCount++;
                    workerRunningState = RUNNING;
                    hasSetRunning = true;
                  }
                }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

        try {
          while (currentTask != self) {
            taskRunner.condition.await()
          }
        } finally {
          serialTaskQueue.remove(yieldCompleteTask)
        }
    
        // If we're yielding until we're exhausted and a task run, keep going until a task doesn't run.
        if (strategy == ResumePriority.AfterOtherTasks && otherTasksStarted) {
          return yieldUntil(strategy, condition)
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          body: Buffer,
          maxChunkSize: Int,
        ) = apply {
          removeHeader("Content-Length")
          headers.add(CHUNKED_BODY_HEADER)
    
          val bytesOut = Buffer()
          while (!body.exhausted()) {
            val chunkSize = minOf(body.size, maxChunkSize.toLong())
            bytesOut.writeHexadecimalUnsignedLong(chunkSize)
            bytesOut.writeUtf8("\r\n")
            bytesOut.write(body, chunkSize)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

            encodedCharBuffer.writeUtf8CodePoint(codePoint)
          } else {
            encodedCharBuffer.writeString(input, i, i + Character.charCount(codePoint), charset)
          }
    
          while (!encodedCharBuffer.exhausted()) {
            val b = encodedCharBuffer.readByte().toInt() and 0xff
            writeByte('%'.code)
            writeByte(HEX_DIGITS[b shr 4 and 0xf].code)
            writeByte(HEX_DIGITS[b and 0xf].code)
          }
        } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

              maskCursor.seek(messageFrameBuffer.size - frameLength)
              toggleMask(maskCursor, maskKey!!)
              maskCursor.close()
            }
          }
    
          if (isFinalFrame) break // We are exhausted and have no continuations.
    
          readUntilNonControlFrame()
          if (opcode != OPCODE_CONTINUATION) {
            throw ProtocolException("Expected continuation opcode. Got: ${opcode.toHexString()}")
          }
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (0)
Back to top