Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for doesNotConsumeBuffer (0.07 sec)

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

        assertThat(Buffer().writeByte(0x00).isProbablyUtf8(16L)).isFalse()
        assertThat(Buffer().writeByte(0xc0).isProbablyUtf8(16L)).isFalse()
      }
    
      @Test fun doesNotConsumeBuffer() {
        val buffer = Buffer()
        buffer.writeUtf8("hello ".repeat(1024))
        assertThat(buffer.isProbablyUtf8(100L)).isTrue()
        assertThat(buffer.readUtf8()).isEqualTo("hello ".repeat(1024))
      }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Oct 06 22:47:06 UTC 2025
    - 2.4K bytes
    - Viewed (0)
Back to top