Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 36 for WriteByte (0.17 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt

            in 0..2 -> {
              completeEvent(id, type, data)
              return true
            }
    
            in 3..4 -> {
              source.readData(data)
            }
    
            in 5..7 -> {
              data.writeByte('\n'.code) // 'data' on a line of its own.
            }
    
            in 8..9 -> {
              id = source.readUtf8LineStrict().takeIf { it.isNotEmpty() }
            }
    
            in 10..12 -> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

        require(streamId and 0x80000000.toInt() == 0) { "reserved bit set: $streamId" }
        sink.writeMedium(length)
        sink.writeByte(type and 0xff)
        sink.writeByte(flags and 0xff)
        sink.writeInt(streamId and 0x7fffffff)
      }
    
      @Throws(IOException::class)
      override fun close() {
        this.withLock {
          closed = true
          sink.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

          with(sink) {
            writeInt(totalRuleBytes)
            for (domain in sortedRules) {
              write(domain).writeByte(NEWLINE)
            }
            writeInt(totalExceptionRuleBytes)
            for (domain in sortedExceptionRules) {
              write(domain).writeByte(NEWLINE)
            }
          }
        }
      }
    
      private suspend fun writeOutputFile(importResults: ImportResults) =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

            if (value < prefixMask) {
              out.writeByte(bits or value)
              return
            }
    
            // Write the mask to start a multibyte value.
            out.writeByte(bits or prefixMask)
            value -= prefixMask
    
            // Write 7 bits at a time 'til we're done.
            while (value >= 0x80) {
              val b = value and 0x7f
              out.writeByte(b or 0x80)
              value = value ushr 7
            }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

      @Test fun serverMessageLengthShort() {
        // Create a payload which will overflow the normal payload byte size.
        val payload = Buffer()
        while (payload.completeSegmentByteCount() <= PAYLOAD_BYTE_MAX) {
          payload.writeByte('0'.code)
        }
        serverWriter.writeMessageFrame(OPCODE_BINARY, payload.snapshot())
    
        // Write directly to the unbuffered sink. This ensures it will become single frame.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

              .post(
                object : RequestBody() {
                  override fun contentType() = null
    
                  override fun writeTo(sink: BufferedSink) {
                    for (i in 0..9) {
                      sink.writeByte(0)
                      sink.flush()
                      sleep(100)
                    }
                    fail("Expected connection to be closed")
                  }
                },
              )
              .build(),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

                  }
    
                  @Throws(
                    IOException::class,
                  )
                  override fun writeTo(sink: BufferedSink) {
                    for (i in 0..9) {
                      sink.writeByte(0)
                      sink.flush()
                      sleep(100)
                    }
                    fail("Expected connection to be closed")
                  }
                },
            ),
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

         */
        fun concatLengthPrefixed(protocols: List<Protocol>): ByteArray {
          val result = Buffer()
          for (protocol in alpnProtocolNames(protocols)) {
            result.writeByte(protocol.length)
            result.writeUtf8(protocol)
          }
          return result.readByteArray()
        }
      }
    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)
  9. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

      }
    
      /** Returns a byte string that differs from this one by one bit. */
      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")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 43.9K bytes
    - Viewed (0)
  10. okhttp-android/src/main/baseline-prof.txt

    HSPLokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
    HSPLokio/Buffer;->write([B)Lokio/Buffer;
    HSPLokio/Buffer;->write([BII)Lokio/Buffer;
    HSPLokio/Buffer;->writeAll(Lokio/Source;)J
    HSPLokio/Buffer;->writeByte(I)Lokio/Buffer;
    HSPLokio/Buffer;->writeByte(I)Lokio/BufferedSink;
    HSPLokio/Buffer;->writeInt(I)Lokio/Buffer;
    HSPLokio/Buffer;->writeShort(I)Lokio/Buffer;
    HSPLokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
Back to top