Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 400 for Buffer (0.2 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt

        val buffer = Buffer()
        operator.read(6, buffer, 21)
        operator.read(36, buffer, 1)
        operator.read(5, buffer, 5)
        operator.read(28, buffer, 8)
        operator.read(17, buffer, 10)
        operator.read(36, buffer, 2)
        operator.read(2, buffer, 4)
        operator.write(0, buffer, buffer.size)
        operator.read(0, buffer, 12)
        operator.read(47, buffer, 3)
        operator.read(45, buffer, 2)
        operator.read(47, buffer, 3)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        assertThat(body.isOneShot()).isEqualTo(false)
    
        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(body.contentLength()).isEqualTo(buffer.size)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
    
        val buffer2 = Buffer()
        body.writeTo(buffer2)
        assertThat(body.contentLength()).isEqualTo(buffer2.size)
        assertThat(buffer2.readUtf8()).isEqualTo(expected)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FormBodyTest.kt

        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
      }
    
      @Test
      fun buildEmptyForm() {
        val body = FormBody.Builder().build()
        val expected = ""
        assertThat(body.contentLength()).isEqualTo(expected.length.toLong())
        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

      private fun sourceReader(source: Source?): Callable<ByteString> {
        return Callable {
          val buffer = Buffer()
          while (source!!.read(buffer, 16384) != -1L) {
          }
          source.close()
          buffer.readByteString()
        }
      }
    
      private fun assertFile(
        prefix: ByteString,
        upstreamSize: Long,
        metadataSize: Int,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

     * limitations under the License.
     */
    package okhttp3
    
    import java.io.IOException
    import okhttp3.Interceptor.Chain
    import okio.Buffer
    import okio.BufferedSink
    import okio.ForwardingSink
    import okio.Sink
    import okio.buffer
    
    /** Rewrites the request body sent to the server to be all uppercase.  */
    class UppercaseRequestInterceptor : Interceptor {
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. okhttp-logging-interceptor/src/test/java/okhttp3/logging/IsProbablyUtf8Test.kt

    import okhttp3.logging.internal.isProbablyUtf8
    import okio.Buffer
    import org.junit.jupiter.api.Test
    
    class IsProbablyUtf8Test {
      @Test fun isProbablyUtf8() {
        assertThat(Buffer().isProbablyUtf8()).isTrue()
        assertThat(Buffer().writeUtf8("abc").isProbablyUtf8()).isTrue()
        assertThat(Buffer().writeUtf8("new\r\nlines").isProbablyUtf8()).isTrue()
        assertThat(Buffer().writeUtf8("white\t space").isProbablyUtf8()).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

            val read = delegate.read(buffer, byteCount)
            if (read != -1L) {
              sink.write(buffer.readByteString().toAsciiUppercase())
            }
            return read
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

            boundary = "simple boundary",
            source = Buffer().writeUtf8(multipart),
          )
    
        assertThat(parts.nextPart()).isNotNull()
        assertThat(parts.nextPart()).isNull()
        assertThat(parts.nextPart()).isNull()
      }
    
      @Test fun `empty source`() {
        val parts =
          MultipartReader(
            boundary = "simple boundary",
            source = Buffer(),
          )
    
        assertFailsWith<EOFException> {
    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/MultipartReader.kt

    import java.io.Closeable
    import java.io.IOException
    import java.net.ProtocolException
    import okhttp3.internal.http1.HeadersReader
    import okio.Buffer
    import okio.BufferedSource
    import okio.ByteString.Companion.encodeUtf8
    import okio.Options
    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    /**
     * Reads a stream of [RFC 2046][rfc_2046] multipart body parts. Callers read parts one-at-a-time
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/next_pluggable_device/BUILD

            "//tensorflow/c:kernels_hdrs",
            "//tensorflow/c:tf_buffer_internal",
            "//tensorflow/c:tf_status_headers",
            "@local_xla//xla/pjrt/c:pjrt_c_api_hdrs",
        ],
    )
    
    cc_library(
        name = "tensor_pjrt_buffer_util",
        srcs = ["tensor_pjrt_buffer_util.cc"],
        hdrs = ["tensor_pjrt_buffer_util.h"],
        visibility = ["//visibility:public"],
        deps = [
    Plain Text
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jan 09 00:52:04 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top