Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for readByteString (0.1 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

          val fileOperator = FileOperator(randomAccessFile.channel)
    
          // Read the header.
          val header = Buffer()
          fileOperator.read(0, header, FILE_HEADER_SIZE)
          val prefix = header.readByteString(PREFIX_CLEAN.size.toLong())
          if (prefix != PREFIX_CLEAN) throw IOException("unreadable cache file")
          val upstreamSize = header.readLong()
          val metadataSize = header.readLong()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

          type = TYPE_MAPPED,
          mappedTo =
            Buffer().also {
              for (cp in mappedToCodePoints) {
                it.writeUtf8CodePoint(cp)
              }
            }.readByteString(),
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

       */
      fun toDer(
        writer: DerWriter,
        value: T,
      )
    
      fun toDer(value: T): ByteString {
        val buffer = Buffer()
        val writer = DerWriter(buffer)
        toDer(writer, value)
        return buffer.readByteString()
      }
    
      /**
       * Returns an adapter that expects this value wrapped by another value. Typically this occurs
       * when a value has both a context or application tag and a universal tag.
       *
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

            .writeByte(0xE7)
            .writeByte(3) // String literal not Huffman encoded (len = 3).
            .writeByte('b'.code)
            .writeByte('a'.code)
            .writeByte('r'.code)
            .readByteString()
        val actual = bytesOut.readByteString()
        assertThat(actual).isEqualTo(expected)
      }
    
      @Test
      fun staticTableIndexedHeaders() {
        hpackWriter!!.writeHeaders(headerEntries(":method", "GET"))
        assertBytes(0x82)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 38.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

          source: BufferedSource,
          length: Int,
        ) {
          check(type == -1)
          this.type = Http2.TYPE_DATA
          this.inFinished = inFinished
          this.streamId = streamId
          this.data = source.readByteString(length.toLong()).toByteArray()
        }
    
        override fun rstStream(
          streamId: Int,
          errorCode: ErrorCode,
        ) {
          check(type == -1)
          this.type = Http2.TYPE_RST_STREAM
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

        }
    
        skipRestOfLine()
    
        result +=
          Mapping(
            sourceCodePoint0.toInt(),
            sourceCodePoint1.toInt(),
            type,
            mappedTo.readByteString(),
          )
      }
    
      return SimpleIdnaMappingTable(result)
    }
    
    internal data class Mapping(
      val sourceCodePoint0: Int,
      val sourceCodePoint1: Int,
      val type: Int,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  7. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

            throw IOException(
              "response size exceeds limit ($MAX_RESPONSE_SIZE bytes): ${body.contentLength()} bytes",
            )
          }
    
          val responseBytes = body.source().readByteString()
    
          return DnsRecordCodec.decodeAnswers(hostname, responseBytes)
        }
      }
    
      private fun buildRequest(
        hostname: String,
        type: Int,
      ): Request =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Oct 31 09:27:31 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

            ) {
              assertThat(inFinished).isFalse()
              assertThat(streamId).isEqualTo(expectedStreamId)
              assertThat(length).isEqualTo(Http2.INITIAL_MAX_FRAME_SIZE)
              val data = source.readByteString(length.toLong())
              for (b in data.toByteArray()) {
                assertThat(b).isEqualTo(2.toByte())
              }
            }
          },
        )
      }
    
      @Test fun dataFrameNotAssociateWithStream() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/RequestTest.kt

            " user-agent:OkHttp" +
            "]}",
        )
      }
    
      private fun bodyToHex(body: RequestBody): String {
        val buffer = Buffer()
        body.writeTo(buffer)
        return buffer.readByteString().hex()
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  10. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

      private fun ByteString.offByOneBit(): ByteString {
        return Buffer()
          .write(this, 0, size - 1)
          .writeByte(this[size - 1].toInt() xor 1)
          .readByteString()
      }
    
      private fun date(s: String): Date {
        return SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").run {
          timeZone = TimeZone.getTimeZone("GMT")
          parse(s)
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 43.9K bytes
    - Viewed (0)
Back to top