Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 149 for source (0.18 sec)

  1. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

        if (buffer[0] != ' '.code.toByte()) return
        skip(1L)
      }
    }
    
    private fun BufferedSource.skipRestOfLine() {
      when (val newline = indexOf('\n'.code.toByte())) {
        -1L -> skip(buffer.size) // Exhaust this source.
        else -> skip(newline + 1)
      }
    }
    
    /**
     * Reads lines from `IdnaMappingTable.txt`.
     *
     * Comment lines are either blank or start with a `#` character. Lines may also end with a comment.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

    /*
     * Copyright (C) 2012 Square, Inc.
     * Copyright (C) 2012 The Android Open Source Project
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *      http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  3. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val source2 = relay.newSource()!!.buffer()
        assertThat(source1.readUtf8(5)).isEqualTo("abcde")
        assertThat(source2.readUtf8(5)).isEqualTo("abcde")
        assertThat(source2.readUtf8(5)).isEqualTo("fghij")
        assertThat(source1.readUtf8(5)).isEqualTo("fghij")
        assertThat(source1.exhausted()).isTrue()
        assertThat(source2.exhausted()).isTrue()
        source1.close()
        source2.close()
        assertThat(relay.isClosed).isTrue()
    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)
  4. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

        private var closed: Boolean = false
    
        override fun timeout(): Timeout = timeout
    
        override fun write(
          source: Buffer,
          byteCount: Long,
        ) {
          check(!closed) { "closed" }
          checkOffsetAndCount(source.size, 0, byteCount)
          sink.write(source, byteCount)
        }
    
        override fun flush() {
    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)
  5. 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(),
          )
    
    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)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * optional. If present, it contains the TLS version.
         */
        @Throws(IOException::class)
        constructor(rawSource: Source) {
          rawSource.use {
            val source = rawSource.buffer()
            val urlLine = source.readUtf8LineStrict()
            // Choice here is between failing with a correct RuntimeException
            // or mostly silently with an IOException
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        while (true) {
          val source = this.source!!
          val sink = this.sink!!
          val tunnelCodec =
            Http1ExchangeCodec(
              // No client for CONNECT tunnels:
              client = null,
              carrier = this,
              source = source,
              sink = sink,
            )
          source.timeout().timeout(readTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt

          }
          println()
        }
    
        // Stream the response to the System.out as it is returned from the server.
        val out = System.out.sink()
        val source = response.body.source()
        while (!source.exhausted()) {
          out.write(source.buffer, source.buffer.size)
          out.flush()
        }
    
        response.body.close()
      } catch (e: IOException) {
        e.printStackTrace()
      } finally {
        close()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

            override fun source(): BufferedSource {
              return uppercaseSource(delegate().source()).buffer()
            }
          }
        return response.newBuilder()
          .body(uppercaseBody)
          .build()
      }
    
      private fun uppercaseSource(source: BufferedSource): ForwardingSource {
        return object : ForwardingSource(source) {
          @Throws(IOException::class)
          override fun 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)
  10. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.containers.BasicMockServerTest.Companion.MOCKSERVER_IMAGE
    import okhttp3.containers.BasicMockServerTest.Companion.trustMockServer
    import okio.buffer
    import okio.source
    import org.junit.jupiter.api.Test
    import org.mockserver.client.MockServerClient
    import org.mockserver.configuration.Configuration
    import org.mockserver.logging.MockServerLogger
    import org.mockserver.model.HttpRequest.request
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
Back to top