Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for readUtf8Line (0.07 sec)

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

          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response B")
          requestBody.writeUtf8("request C\n")
          requestBody.flush()
          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response D")
          requestBody.writeUtf8("request E\n")
          requestBody.flush()
          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response F")
          requestBody.close()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 24.8K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt

                sink.writeUtf8("client says hello\n")
                sink.flush()
    
                assertThat(source.readUtf8Line()).isEqualTo("server says hello")
    
                sink.writeUtf8("client says goodbye\n")
                sink.flush()
    
                assertThat(source.readUtf8Line()).isEqualTo("server says goodbye")
    
                assertThat(source.exhausted()).isTrue()
              }
            }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ExternalHttp2Example.kt

          )
        val response = call.execute()
        try {
          println(response.code)
          println("PROTOCOL ${response.protocol}")
          var line: String?
          while (response.body
              .source()
              .readUtf8Line()
              .also { line = it } != null
          ) {
            println(line)
          }
        } finally {
          response.body.close()
        }
        client.connectionPool.evictAll()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/WebPlatformUrlTestData.kt

      companion object {
        fun load(source: BufferedSource): List<WebPlatformUrlTestData> {
          val list = mutableListOf<WebPlatformUrlTestData>()
          while (true) {
            val line = source.readUtf8Line() ?: break
            if (line.isEmpty() || line.startsWith("#")) continue
    
            var i = 0
            val parts = line.split(Regex(" ")).toTypedArray()
    
            val element = WebPlatformUrlTestData()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/internal/cache/DiskLruCacheTest.kt

          }
        }
      }
    
      private fun readJournalLines(): List<String> {
        val result = mutableListOf<String>()
        filesystem.read(journalFile) {
          while (true) {
            val line = readUtf8Line() ?: break
            result.add(line)
          }
        }
        return result
      }
    
      private fun getCleanFile(
        key: String,
        index: Int,
      ) = cacheDir / "$key.$index"
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 75.7K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

        server.enqueue(
          MockResponse
            .Builder()
            .body("Request #2")
            .build(),
        )
        val bodySource = get(server.url("/")).body.source()
        assertThat(bodySource.readUtf8Line()).isEqualTo("ABCDE")
        bodySource.use {
          assertFailsWith<IOException> {
            bodySource.readUtf8(21)
          }
        }
        assertThat(cache.writeAbortCount()).isEqualTo(1)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
Back to top