Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 80 for exhaust (0.04 seconds)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Stream.kt

       * Returns the trailers if they're immediately available.
       */
      @Throws(IOException::class)
      fun peekTrailers(): Headers? {
        withLock {
          if (source.finished && source.receiveBuffer.exhausted() && source.readBuffer.exhausted()) {
            return source.trailers ?: Headers.EMPTY
          }
          if (errorCode != null) {
            throw errorException ?: StreamResetException(errorCode!!)
          }
          return null
        }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Jul 07 18:57:05 GMT 2025
    - 22.4K bytes
    - Click Count (0)
  2. 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) {
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 5.7K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/IsProbablyUtf8.kt

     */
    internal fun BufferedSource.isProbablyUtf8(codePointLimit: Long = Long.MAX_VALUE): Boolean {
      try {
        val peek = peek()
        for (i in 0 until codePointLimit) {
          if (peek.exhausted()) {
            break
          }
          val codePoint = peek.readUtf8CodePoint()
          if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
            return false
          }
        }
        return true
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Oct 06 22:47:06 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  4. 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++;
        }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Sep 16 12:42:11 GMT 2025
    - 51.4K bytes
    - Click Count (0)
  5. 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.
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue May 27 22:00:49 GMT 2025
    - 8.5K bytes
    - Click Count (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dns.kt

       * connection to an address fails, OkHttp will retry the connection with the next address until
       * either a connection is made, the set of IP addresses is exhausted, or a limit is exceeded.
       */
      @Throws(UnknownHostException::class)
      fun lookup(hostname: String): List<InetAddress>
    
      companion object {
        /**
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 2.2K bytes
    - Click Count (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/SocketEffect.kt

      ) : SocketEffect
    
      /**
       * On HTTP/2, send a [GOAWAY frame](https://tools.ietf.org/html/rfc7540#section-6.8) immediately
       * after the response and will close the connection when the client's socket is exhausted.
       *
       * On HTTP/1 this closes the socket.
       */
      public object ShutdownConnection : SocketEffect
    
      /**
       * On HTTP/2 this will send the error code on the stream.
       *
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Jun 20 11:46:46 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  8. 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()
      }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 2.7K bytes
    - Click Count (0)
  9. 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;
            }
          };
        }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Click Count (0)
  10. 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()) {
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.7K bytes
    - Click Count (0)
Back to Top