Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for readByteString (0.46 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Hpack.kt

            val name = getName(index)
            val value = readByteString()
            headerList.add(Header(name, value))
          }
    
          @Throws(IOException::class)
          private fun readLiteralHeaderWithoutIndexingNewName() {
            val name = checkLowercase(readByteString())
            val value = readByteString()
            headerList.add(Header(name, value))
          }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  2. okhttp/src/commonTest/kotlin/okhttp3/internal/publicsuffix/ConfiguredPublicSuffixDatabaseTest.kt

          Buffer()
            .writeUtf8("*.jp\n")
            .writeUtf8("*.square.jp\n")
            .writeUtf8("example.com\n")
            .writeUtf8("square.com\n")
            .readByteString()
        list.exceptionBytes =
          Buffer()
            .writeUtf8("my.square.jp\n")
            .readByteString()
    
        assertThat(publicSuffixDatabase.getEffectiveTldPlusOne("my.square.jp"))
          .isEqualTo("my.square.jp")
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

        inflater.inflate(buffer)
        assertThat(buffer.readByteString()).isEqualTo(message1)
    
        DeflaterSink(buffer, Deflater(Deflater.DEFAULT_COMPRESSION, true)).use { sink ->
          sink.write(Buffer().write(message2), message2.size.toLong())
        }
        buffer.writeByte(0x00)
        inflater.inflate(buffer)
        assertThat(buffer.readByteString()).isEqualTo(message2)
      }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun Sep 21 06:26:07 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  4. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        val derWriter = DerWriter(buffer)
    
        derWriter.write("test", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 30L) {
          derWriter.writeUtf8("a".repeat(201))
        }
    
        assertThat(buffer.readByteString(3)).isEqualTo("1e81c9".decodeHex())
        assertThat(buffer.readUtf8()).isEqualTo("a".repeat(201))
      }
    
      @Test fun `decode primitive bit string`() {
        val buffer =
          Buffer()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

              nameBuf.writeUtf8(label)
            }
            nameBuf.writeByte(0) // end
    
            nameBuf.copyTo(this, 0, nameBuf.size)
            writeShort(type)
            writeShort(1) // CLASS_IN
          }.readByteString()
    
      @Throws(Exception::class)
      fun decodeAnswers(
        hostname: String,
        byteString: ByteString,
      ): List<InetAddress> {
        val result = mutableListOf<InetAddress>()
    
        val buf = Buffer()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/BasePublicSuffixList.kt

          listSource().buffer().use { bufferedSource ->
            val totalBytes = bufferedSource.readInt()
            publicSuffixListBytes = bufferedSource.readByteString(totalBytes.toLong())
    
            val totalExceptionBytes = bufferedSource.readInt()
            publicSuffixExceptionListBytes = bufferedSource.readByteString(totalExceptionBytes.toLong())
          }
    
          synchronized(this) {
            this.bytes = publicSuffixListBytes!!
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        val byteString = source.readByteString(bytesLeft)
        return BitString(byteString, unusedBitCount)
      }
    
      fun readOctetString(): ByteString {
        if (bytesLeft == -1L || constructed) {
          throw ProtocolException("constructed octet strings not supported for DER")
        }
        return source.readByteString(bytesLeft)
      }
    
      fun readUtf8String(): String {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt

            maskCursor.close()
          }
        }
    
        when (opcode) {
          OPCODE_CONTROL_PING -> {
            frameCallback.onReadPing(controlFrameBuffer.readByteString())
          }
          OPCODE_CONTROL_PONG -> {
            frameCallback.onReadPong(controlFrameBuffer.readByteString())
          }
          OPCODE_CONTROL_CLOSE -> {
            var code = CLOSE_NO_STATUS_CODE
            var reason = ""
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 16:11:23 UTC 2025
    - 10K bytes
    - Viewed (0)
  9. okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorTest.kt

        result.zstdCompress().buffer().use {
          it.write(this@zstdCompress)
        }
        return result.readByteString()
      }
    
      private fun ByteString.gzipCompress(): ByteString {
        val result = Buffer()
        (result as Sink).gzip().buffer().use {
          it.write(this@gzipCompress)
        }
        return result.readByteString()
      }
    
      private fun response(
        url: String,
        body: ByteString,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Aug 01 06:04:22 UTC 2025
    - 4.8K bytes
    - Viewed (1)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

            sink: Buffer,
            byteCount: Long,
          ): Long {
            val buffer = Buffer()
            val read = delegate.read(buffer, byteCount)
            if (read != -1L) {
              sink.write(buffer.readByteString().toAsciiUppercase())
            }
            return read
          }
        }
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.8K bytes
    - Viewed (0)
Back to top