Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for exhausted (0.19 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  2. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Apr 20 03:33:06 GMT 2024
    - 50.6K bytes
    - Viewed (0)
  6. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  7. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

     * signatures.
     */
    fun Buffer.isProbablyUtf8(): Boolean {
      try {
        val prefix = Buffer()
        val byteCount = size.coerceAtMost(64)
        copyTo(prefix, 0, byteCount)
        for (i in 0 until 16) {
          if (prefix.exhausted()) {
            break
          }
          val codePoint = prefix.readUtf8CodePoint()
          if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
            return false
          }
        }
        return true
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        get() = if (limit == -1L) -1L else (limit - byteCount)
    
      fun hasNext(): Boolean = peekHeader() != null
    
      /**
       * Returns the next header to process unless this scope is exhausted.
       *
       * This returns null if:
       *
       *  * The stream is exhausted.
       *  * We've read all of the bytes of an object whose length is known.
       *  * We've reached the [DerHeader.TAG_END_OF_CONTENTS] of an object whose length is unknown.
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
Back to top