Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 70 for writeUtf8 (0.17 sec)

  1. 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)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

            override fun contentType(): MediaType? {
              return null
            }
    
            override fun writeTo(sink: BufferedSink) {
              sink.writeUtf8("abc")
              sink.flush()
              makeFailingCall()
              sink.writeUtf8("def")
              sink.flush()
            }
          }
        val call =
          client.newCall(
            Request(
              url = server.url("/"),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

          in 0..63 -> {
            // Length of the UTF-16 sequence that this range maps to. The offset is b2b3.
            val beginIndex = ranges.read14BitInt(rangesIndex + 2)
            sink.writeUtf8(mappings, beginIndex, beginIndex + b1)
          }
          in 64..79 -> {
            // Mapped inline as codePoint delta to subtract
            val b2 = ranges[rangesIndex + 2].code
            val b3 = ranges[rangesIndex + 3].code
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Apr 02 11:39:58 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      fun contentDisagreesWithChunkedHeaderBodyTooLong() {
        val builder =
          MockResponse.Builder()
            .chunkedBody("abc", 3)
        val buffer = Buffer()
        builder.body!!.writeTo(buffer)
        buffer.writeUtf8("\r\nYOU SHOULD NOT SEE THIS")
        builder.body(buffer)
        builder.clearHeaders()
        builder.addHeader("Transfer-encoding: chunked")
        server.enqueue(builder.build())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CacheTest.kt

          content: String,
          chunkSize: Int,
        ) {
          setBody(response, Buffer().writeUtf8(content), chunkSize)
        }
      }
    
      /** Returns a gzipped copy of `bytes`.  */
      fun gzip(data: String): Buffer {
        val result = Buffer()
        val sink = GzipSink(result).buffer()
        sink.writeUtf8(data)
        sink.close()
        return result
      }
    
      companion object {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  6. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      }
    
      @Test fun `encode tag and length`() {
        val buffer = Buffer()
        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`() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/EventListenerTest.kt

                    return null
                  }
    
                  override fun writeTo(sink: BufferedSink) {
                    try {
                      Thread.sleep(requestBodyDelay)
                      sink.writeUtf8("abc")
                    } catch (e: InterruptedException) {
                      throw InterruptedIOException()
                    }
                  }
                },
              )
              .build(),
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      }
    
      private fun gzip(bytes: String): Buffer {
        val bytesOut = Buffer()
        val sink = GzipSink(bytesOut).buffer()
        sink.writeUtf8(bytes)
        sink.close()
        return bytesOut
      }
    
      internal inner class AsyncRequest(
        val path: String,
        val countDownLatch: CountDownLatch,
      ) : Runnable {
        override fun run() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  9. okhttp-android/src/main/baseline-prof.txt

    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;
    HSPLokio/Buffer;->writeUtf8(Ljava/lang/String;II)Lokio/Buffer;
    HSPLokio/ByteString$Companion;-><init>(Landroidx/lifecycle/viewmodel/R$id;)V
    HSPLokio/ByteString$Companion;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
    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)
  10. android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

       */
      @Override
      public void writeShort(int v) throws IOException {
        out.write(0xFF & v);
        out.write(0xFF & (v >> 8));
      }
    
      @Override
      public void writeUTF(String str) throws IOException {
        ((DataOutputStream) out).writeUTF(str);
      }
    
      // Overriding close() because FilterOutputStream's close() method pre-JDK8 has bad behavior:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 5.2K bytes
    - Viewed (0)
Back to top