Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 76 for exhaust (0.07 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt

      fun sourceEmpty() {
        val mediaType = if (null == null) null else "any/thing; charset=${null}".toMediaType()
        val body = "".decodeHex().toResponseBody(mediaType)
        val source = body.source()
        assertThat(source.exhausted()).isTrue()
        assertThat(source.readUtf8()).isEqualTo("")
      }
    
      @Test
      fun sourceClosesUnderlyingSource() {
        var closed = false
    
        val body: ResponseBody =
          object : ResponseBody() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  2. okhttp/src/commonTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

      }
    
      @Test
      fun allPublicSuffixes() {
        val buffer = Buffer()
        FileSystem.SYSTEM.read(pathForTests) {
          val length = readInt()
          buffer.write(this, length.toLong())
        }
        while (!buffer.exhausted()) {
          var publicSuffix = buffer.readUtf8LineStrict()
          if (publicSuffix.contains("*")) {
            // A wildcard rule, let's replace the wildcard with a value.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 22:00:49 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/FileEntryAdapterIteratorTest.java

            // Constructor gets entry1, first next() returns it and gets entry2,
            // second next() returns entry2 and gets entry3,
            // third next() returns entry3 and exhausts
            when(delegate.hasNext()).thenReturn(true, true, true, false);
            when(delegate.next()).thenReturn(entry1, entry2, entry3);
    
            TestIterator iterator = new TestIterator(null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  4. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

          }
          println()
        }
    
        // Stream the response to the System.out as it is returned from the server.
        val out = System.out.sink()
        val source = response.body.source()
        while (!source.exhausted()) {
          out.write(source.buffer, source.buffer.size)
          out.flush()
        }
    
        response.body.close()
      } catch (e: IOException) {
        e.printStackTrace()
      } finally {
        close()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  5. 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:
     *
     * {@snippet :
     * List<String> expectedElements =
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  6. src/main/java/jcifs/SmbResourceException.java

        /**
         * Static factory for connection pool exhaustion
         */
        public static SmbResourceException connectionPoolExhausted(int errorCode, int poolSize) {
            return new SmbResourceException("Connection pool exhausted", errorCode, ResourceType.CONNECTION, 0, poolSize);
        }
    
        /**
         * Static factory for quota exceeded
         */
        public static SmbResourceException quotaExceeded(int errorCode, long used, long quota) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt

                sink.writeUtf8("client says goodbye\n")
                sink.flush()
    
                assertThat(source.readUtf8Line()).isEqualTo("server says goodbye")
    
                assertThat(source.exhausted()).isTrue()
              }
            }
            socketHandler.awaitSuccess()
          }
      }
    
      @Test
      fun upgradeHttps() {
        enableTls(Protocol.HTTP_1_1)
        upgrade()
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  8. 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)
  9. guava/src/com/google/common/graph/EndpointPairIterator.java

      }
    
      private EndpointPairIterator(BaseGraph<N> graph) {
        this.graph = graph;
        this.nodeIterator = graph.nodes().iterator();
      }
    
      /**
       * Called after {@link #successorIterator} is exhausted. Advances {@link #node} to the next node
       * and updates {@link #successorIterator} to iterate through the successors of {@link #node}.
       */
      final boolean advance() {
        checkState(!successorIterator.hasNext());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

            .isEqualTo(headersOf("h1", "v1", "h2", "v2"))
          val responseBody = response.body.source()
          assertThat(responseBody.readUtf8(2)).isEqualTo("ok")
          assertThat(responseBody.exhausted()).isTrue()
          assertThat(response.trailers()).isEqualTo(headersOf("trailers", "boom"))
        }
        body.awaitSuccess()
      }
    
      @Test
      fun serverReadsHeadersData() {
        assumeNotWindows()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 24.8K bytes
    - Viewed (0)
Back to top