Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 76 for exhaust (0.06 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

          var totalRuleBytes = 0
          var totalExceptionRuleBytes = 0
    
          fileSystem.source(publicSuffixListDotDat).buffer().use { source ->
            while (!source.exhausted()) {
              var rule: ByteString = source.readUtf8LineStrict().toRule() ?: continue
    
              if (rule.startsWith(EXCEPTION_RULE_MARKER)) {
                rule = rule.substring(1)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Aug 06 05:33:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  2. 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)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/Progress.java

            @Override public long read(Buffer sink, long byteCount) throws IOException {
              long bytesRead = super.read(sink, byteCount);
              // read() returns the number of bytes read, or -1 if this source is exhausted.
              totalBytesRead += bytesRead != -1 ? bytesRead : 0;
              progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
              return bytesRead;
            }
          };
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/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 {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/WebPlatformUrlTestData.kt

            list += element
          }
          return list
        }
    
        private fun unescape(s: String): String =
          buildString {
            val buffer = Buffer().writeUtf8(s)
            while (!buffer.exhausted()) {
              val c = buffer.readUtf8CodePoint()
              if (c != '\\'.code) {
                append(c.toChar())
                continue
              }
              when (buffer.readUtf8CodePoint()) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/ShareEnumIteratorTest.java

            // End of iteration behavior
            assertFalse(it.hasNext(), "No more elements expected");
            assertNull(it.next(), "next() returns null when exhausted in this implementation");
        }
    
        @Test
        @DisplayName("With filter: only accepted entries are returned and filter is invoked per entry")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Connection.kt

     * bookkeeping easier for the caller: releasing the allocation as soon as the terminal stream has
     * been found. But only complete the stream once its data stream has been exhausted.
     */
    interface Connection {
      /** Returns the route used by this connection. */
      fun route(): Route
    
      /**
       * Returns the socket that this connection is using. Returns an
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2Test.kt

        frame.writeByte(paddingLength)
        frame.write(expectedData)
        frame.write(padding)
        reader.nextFrame(requireSettings = false, assertData())
        // Padding was skipped.
        assertThat(frame.exhausted()).isTrue()
      }
    
      @Test fun readPaddedDataFrameZeroPadding() {
        val dataLength = 1123
        val expectedData = ByteArray(dataLength)
        Arrays.fill(expectedData, 2.toByte())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 28.1K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/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(maxByteCount: Long): Long {
          val toIndex = minOf(source.buffer.size, maxByteCount) + 1L
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 02:11:14 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  10. 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 {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (0)
Back to top