Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for exhausted (0.23 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        assertThat(source2.readUtf8(5)).isEqualTo("abcde")
        assertThat(source2.readUtf8(5)).isEqualTo("fghij")
        assertThat(source1.readUtf8(5)).isEqualTo("fghij")
        assertThat(source1.exhausted()).isTrue()
        assertThat(source2.exhausted()).isTrue()
        source1.close()
        source2.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_CLEAN, 10L, metadata.size, "abcdefghij", metadata)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/idn/IdnStringprep.kt

       */
      operator fun invoke(input: String): String? = invoke(Buffer().writeUtf8(input))
    
      internal operator fun invoke(input: BufferedSource): String? {
        // 1. Map.
        val mapResult = Buffer()
        while (!input.exhausted()) {
          val codePoint = input.readUtf8CodePoint()
          when (val mappedCodePoint = mapping[codePoint]) {
            null -> mapResult.writeUtf8CodePoint(codePoint)
            else -> mapResult.writeUtf8(mappedCodePoint)
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

        if (peek == null) {
          if (!exhausted()) return // Expected a token; got something else.
          result.add(Challenge(schemeName, emptyMap()))
          return
        }
    
        var eqCount = skipAll('='.code.toByte())
        val commaSuffixed = skipCommasAndWhitespace()
    
        // It's a token68 because there isn't a value after it.
        if (!commaPrefixed && (commaSuffixed || exhausted())) {
          result.add(
            Challenge(
    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)
  4. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

        apply {
          actions += { stream ->
            if (!stream.requestBody.exhausted()) throw AssertionError("expected exhausted")
          }
        }
    
      fun cancelStream() =
        apply {
          actions += { stream -> stream.cancel() }
        }
    
      fun requestIOException() =
        apply {
          actions += { stream ->
            try {
              stream.requestBody.exhausted()
              throw AssertionError("expected IOException")
    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)
  5. okhttp/src/test/java/okhttp3/internal/idn/StringprepReader.kt

    }
    
    private fun BufferedSource.skipWhitespace() {
      while (!exhausted()) {
        if (buffer[0] != ' '.code.toByte()) return
        skip(1L)
      }
    }
    
    private fun BufferedSource.skipRestOfLine() {
      when (val newline = indexOf('\n'.code.toByte())) {
        -1L -> skip(buffer.size) // Exhaust this source.
        else -> skip(newline + 1)
      }
    }
    
    class MappingListCodePointMapping(
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

        while (hasNextProxy()) {
          // Postponed routes are always tried last. For example, if we have 2 proxies and all the
          // routes for proxy1 should be postponed, we'll move to proxy2. Only after we've exhausted
          // all the good routes will we attempt the postponed routes.
          val proxy = nextProxy()
          for (inetSocketAddress in inetSocketAddresses) {
            val route = Route(address, proxy, inetSocketAddress)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        }
        true // Success! The source has been exhausted.
      } catch (_: InterruptedIOException) {
        false // We ran out of time before exhausting the source.
      } finally {
        if (originalDurationNs == Long.MAX_VALUE) {
          timeout().clearDeadline()
        } else {
          timeout().deadlineNanoTime(nowNs + originalDurationNs)
        }
      }
    }
    
    /**
    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)
  8. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

    internal const val TYPE_VALID = 6
    
    private fun BufferedSource.skipWhitespace() {
      while (!exhausted()) {
        if (buffer[0] != ' '.code.toByte()) return
        skip(1L)
      }
    }
    
    private fun BufferedSource.skipRestOfLine() {
      when (val newline = indexOf('\n'.code.toByte())) {
        -1L -> skip(buffer.size) // Exhaust this source.
        else -> skip(newline + 1)
      }
    }
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Iterators.java

          UnmodifiableIterator<T> iterator) {
        return checkNotNull(iterator);
      }
    
      /**
       * Returns the number of elements remaining in {@code iterator}. The iterator will be left
       * exhausted: its {@code hasNext()} method will return {@code false}.
       */
      public static int size(Iterator<?> iterator) {
        long count = 0L;
        while (iterator.hasNext()) {
          iterator.next();
          count++;
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        val v1 = utf8.readDecimalLong()
        require(utf8.readByte() == '.'.code.toByte())
        val v2 = utf8.readDecimalLong()
        writeVariableLengthLong(v1 * 40 + v2)
    
        while (!utf8.exhausted()) {
          require(utf8.readByte() == '.'.code.toByte())
          val vN = utf8.readDecimalLong()
          writeVariableLengthLong(vN)
        }
      }
    
      fun writeRelativeObjectIdentifier(s: String) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top