Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for doesNotReadEntireSource (0.08 seconds)

  1. okhttp/src/commonTest/kotlin/okhttp3/internal/IsProbablyUtf8Test.kt

        assertThat(buffer.isProbablyUtf8(100L)).isTrue()
        assertThat(buffer.readUtf8()).isEqualTo("hello ".repeat(1024))
      }
    
      /** Confirm [isProbablyUtf8] doesn't attempt to read the entire stream. */
      @Test fun doesNotReadEntireSource() {
        val unlimitedSource =
          object : Source {
            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
              sink.writeUtf8("a".repeat(byteCount.toInt()))
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Oct 06 22:47:06 GMT 2025
    - 2.4K bytes
    - Click Count (0)
Back to Top