Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for Read (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        /** The next byte to read. This is always less than or equal to [upstreamPos]. */
        private var sourcePos = 0L
    
        /**
         * Selects where to find the bytes for a read and read them. This is one of three sources.
         *
         * ## Upstream
         *
         * In this case the current thread is assigned as the upstream reader. We read bytes from
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

        val body = body("")
        val bytes = body.byteStream()
        assertThat(bytes.read()).isEqualTo(-1)
      }
    
      @Test
      fun byteStreamSeesBom() {
        val body = body("efbbbf68656c6c6f")
        val bytes = body.byteStream()
        assertThat(bytes.read()).isEqualTo(0xef)
        assertThat(bytes.read()).isEqualTo(0xbb)
        assertThat(bytes.read()).isEqualTo(0xbf)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        val derReader = DerReader(buffer)
    
        derReader.read("test") { header ->
          assertThat(header.tag).isEqualTo(16L)
    
          derReader.read("test") { header2 ->
            assertThat(header2.tag).isEqualTo(21L)
            assertThat(derReader.readOctetString()).isEqualTo("Smith".encodeUtf8())
          }
    
          derReader.read("test") { header3 ->
            assertThat(header3.tag).isEqualTo(1L)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      var b = addressOffset
    
      var i = pos
      while (i < limit) {
        if (b == address.size) return false // Too many groups.
    
        // Read a delimiter.
        if (b != addressOffset) {
          if (input[i] != '.') return false // Wrong delimiter.
          i++
        }
    
        // Read 1 or more decimal digits for a value in 0..255.
        var value = 0
        val groupOffset = i
        while (i < limit) {
          val c = input[i]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  5. docs/changelogs/changelog_4x.md

     *  Upgrade: [Kotlin 1.8.21][kotlin_1_8_21].
    
    
    ## Version 4.11.0
    
    _2023-04-22_
    
     *  Fix: Don't fail the call when the response code is ‘HTTP 102 Processing’ or
        ‘HTTP 103 Early Hints’.
     *  Fix: Read the response even if writing the request fails. This means you'll get a proper HTTP
        response even if the server rejects your request body.
     *  Fix: Use literal IP addresses directly rather than passing them to `DnsOverHttps`.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          }
    
          val read = super.read(sink, minOf(byteCount, bytesRemainingInChunk))
          if (read == -1L) {
            carrier.noNewExchanges() // The server didn't supply the promised chunk length.
            val e = ProtocolException("unexpected end of stream")
            responseBodyComplete()
            throw e
          }
          bytesRemainingInChunk -= read
          return read
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(inputStream.read()).isEqualTo('A'.code)
        assertThat(inputStream.read()).isEqualTo('B'.code)
        assertThat(inputStream.read()).isEqualTo('C'.code)
        assertThat(inputStream.read()).isEqualTo('D'.code)
        assertThat(inputStream.read()).isEqualTo('E'.code)
        assertThat(inputStream.read()).isEqualTo('F'.code)
        assertThat(inputStream.read()).isEqualTo(-1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

          )
    
        val part = parts.nextPart()!!
        assertThat(part.body.readUtf8()).isEqualTo("abcd\r\n--simple boundar\r\n\r\nefgh")
    
        assertThat(parts.nextPart()).isNull()
      }
    
      @Test fun `do not need to read entire part`() {
        val multipart =
          """
          |--simple boundary
          |
          |abcd
          |efgh
          |ijkl
          |--simple boundary
          |
          |mnop
          |--simple boundary--
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Response.kt

       * should not be read.
       */
      @get:JvmName("networkResponse") val networkResponse: Response?,
      /**
       * Returns the raw response received from the cache. Will be null if this response didn't use
       * the cache. For conditional get requests the cache response and network response may both be
       * non-null. The body of the returned response should not be read.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Request.kt

        /**
         * Attaches [tag] to the request using [T] as a key. Tags can be read from a request using
         * [Request.tag]. Use null to remove any existing tag assigned for [T].
         *
         * Use this API to attach timing, debugging, or other application data to a request so that
         * you may read it in interceptors, event listeners, or callbacks.
         */
        @JvmName("reifiedTag")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top