Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for lengthOf (0.25 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

      }
    
      /**
       * Shortens the last frame from its original length to `length`. This will cause the peer to
       * close the socket as soon as this frame has been written; otherwise the peer stays open until
       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
        val lastFrame = outFrames.removeAt(outFrames.size - 1)
        require(length < bytesOut.size - lastFrame.start)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

      @Test fun serverSmallBufferedPayloadWrittenAsOneFrame() {
        val length = 5
        val payload: ByteString = (binaryData(length))
        serverWriter.writeMessageFrame(OPCODE_TEXT, payload)
        assertData("8105")
        assertData(payload)
      }
    
      @Test fun serverLargeBufferedPayloadWrittenAsOneFrame() {
        val length = 12345
        val payload: ByteString = (binaryData(length))
        serverWriter.writeMessageFrame(OPCODE_TEXT, payload)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

          assertThat(header.tag).isEqualTo(30)
          assertThat(header.constructed).isFalse()
          assertThat(header.length).isEqualTo(201)
        }
    
        assertThat(derReader.hasNext()).isFalse()
      }
    
      @Test fun `decode length encoded with leading zero byte`() {
        val buffer =
          Buffer()
            .writeByte(0b00000010)
            .writeByte(0b10000010)
            .writeByte(0b00000000)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

           * Example:
           * ```
           * --> POST /greeting http/1.1
           * Host: example.com
           * Content-Type: plain/text
           * Content-Length: 3
           * --> END POST
           *
           * <-- 200 OK (22ms)
           * Content-Type: plain/text
           * Content-Length: 6
           * <-- END HTTP
           * ```
           */
          HEADERS,
    
          /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

            }
          }
        assertFailsWith<IOException> {
          body.bytes()
        }.also { expected ->
          assertThat(expected.message).isEqualTo(
            "Content-Length (10) and stream length (5) disagree",
          )
        }
      }
    
      @Test
      fun bytesThrowsMoreThanIntMaxValue() {
        val body: ResponseBody =
          object : ResponseBody() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

          when (dot) {
            -1 -> length - labelStart
            else -> dot - labelStart
          }
        if (labelLength !in 1..63) return true
        if (dot == -1) break
        if (dot == length - 1) break // Trailing '.' is allowed.
        labelStart = dot + 1
      }
    
      return false
    }
    
    internal fun String.containsInvalidHostnameAsciiCodes(): Boolean {
      for (i in 0 until length) {
        val c = this[i]
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  7. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

            } else {
              ""
            }
    
          // If the value is "quoted", drop the quotes.
          if (value.startsWith("\"") && value.endsWith("\"") && value.length >= 2) {
            value = value.substring(1, value.length - 1)
          }
    
          result.add(
            Cookie.Builder()
              .name(name)
              .value(value)
              .domain(url.host)
              .build(),
          )
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/AnyValue.kt

      var constructed: Boolean = false,
      var length: Long = -1L,
      val bytes: ByteString,
    ) {
      // Avoid Long.hashCode(long) which isn't available on Android 5.
      override fun hashCode(): Int {
        var result = 0
        result = 31 * result + tagClass
        result = 31 * result + tag.toInt()
        result = 31 * result + (if (constructed) 0 else 1)
        result = 31 * result + length.toInt()
        result = 31 * result + bytes.hashCode()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      @Test
      fun fixedLengthUpload_byteByByte() {
        doUpload(TransferKind.FIXED_LENGTH, WriteKind.BYTE_BY_BYTE)
      }
    
      @Test
      fun fixedLengthUpload_smallBuffers() {
        doUpload(TransferKind.FIXED_LENGTH, WriteKind.SMALL_BUFFERS)
      }
    
      @Test
      fun fixedLengthUpload_largeBuffers() {
        doUpload(TransferKind.FIXED_LENGTH, WriteKind.LARGE_BUFFERS)
      }
    
      private fun doUpload(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

       * [reader]. For example, if the reader's peeked tag isn't readable by this adapter, it may return
       * a default value.
       *
       * If this does read a value, it starts with the tag and length, and reads an entire value,
       * including any potential composed values.
       *
       * If there's nothing to read and no default value, this will throw an exception.
       */
      fun fromDer(reader: DerReader): T
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top