Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for ByteString (0.26 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

        assertThat(nextEvent()).isEqualTo(Message(string = payload))
      }
    
      fun assertBinaryMessage(payload: ByteString?) {
        assertThat(nextEvent()).isEqualTo(Message(payload))
      }
    
      fun assertPing(payload: ByteString) {
        assertThat(nextEvent()).isEqualTo(Ping(payload))
      }
    
      fun assertPong(payload: ByteString) {
        assertThat(nextEvent()).isEqualTo(Pong(payload))
      }
    
      fun assertClosing(
        code: Int,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Header.kt

        @JvmField val RESPONSE_STATUS: ByteString = RESPONSE_STATUS_UTF8.encodeUtf8()
    
        @JvmField val TARGET_METHOD: ByteString = TARGET_METHOD_UTF8.encodeUtf8()
    
        @JvmField val TARGET_PATH: ByteString = TARGET_PATH_UTF8.encodeUtf8()
    
        @JvmField val TARGET_SCHEME: ByteString = TARGET_SCHEME_UTF8.encodeUtf8()
    
        @JvmField val TARGET_AUTHORITY: ByteString = TARGET_AUTHORITY_UTF8.encodeUtf8()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsRecordCodecTest.kt

    import java.net.UnknownHostException
    import kotlin.test.assertFailsWith
    import okhttp3.AsyncDns.Companion.TYPE_A
    import okhttp3.AsyncDns.Companion.TYPE_AAAA
    import okhttp3.dnsoverhttps.DnsRecordCodec.decodeAnswers
    import okio.ByteString.Companion.decodeHex
    import org.junit.jupiter.api.Test
    
    class DnsRecordCodecTest {
      @Test
      fun testGoogleDotComEncoding() {
        val encoded = encodeQuery("google.com", TYPE_A)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

    import kotlin.test.assertFailsWith
    import okhttp3.TestUtil.threadFactory
    import okhttp3.internal.cache2.Relay.Companion.edit
    import okhttp3.internal.cache2.Relay.Companion.read
    import okio.Buffer
    import okio.ByteString
    import okio.ByteString.Companion.encodeUtf8
    import okio.Pipe
    import okio.Source
    import okio.buffer
    import okio.source
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.BeforeEach
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

          Mapping(0x40100, 0x4017f, TYPE_DISALLOWED, ByteString.EMPTY),
          Mapping(0x40180, 0x40180, TYPE_DISALLOWED, ByteString.EMPTY),
        )
      }
    
      @Test fun withSectionStartAlreadySplit() {
        assertThat(
          withoutSectionSpans(
            listOf(
              Mapping(0x40000, 0x4007f, TYPE_DISALLOWED, ByteString.EMPTY),
              Mapping(0x40080, 0x400ff, TYPE_DISALLOWED, ByteString.EMPTY),
            ),
          ),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  6. okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt

    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.ResponseBody.Companion.toResponseBody
    import okhttp3.brotli.internal.uncompress
    import okio.ByteString
    import okio.ByteString.Companion.EMPTY
    import okio.ByteString.Companion.decodeHex
    import okio.ByteString.Companion.encodeUtf8
    import org.junit.jupiter.api.Test
    
    class BrotliInterceptorTest {
      @Test
      fun testUncompressBrotli() {
        val s =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_TEXT
    import okhttp3.internal.ws.WebSocketProtocol.validateCloseCode
    import okio.BufferedSink
    import okio.BufferedSource
    import okio.ByteString
    import okio.ByteString.Companion.encodeUtf8
    import okio.ByteString.Companion.toByteString
    
    class RealWebSocket(
      taskRunner: TaskRunner,
      /** The application's original request unadulterated by web socket headers. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

      }
    
      private fun MessageDeflater.deflate(byteString: ByteString): ByteString {
        val buffer = Buffer()
        buffer.write(byteString)
        deflate(buffer)
        return buffer.readByteString()
      }
    
      private fun MessageInflater.inflate(byteString: ByteString): ByteString {
        val buffer = Buffer()
        buffer.write(byteString)
        inflate(buffer)
        return buffer.readByteString()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 06 05:31:00 GMT 2024
    - 5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt

      private fun randomByteString(byteCount: Int): ByteString {
        val bytes = ByteArray(byteCount)
        Random(0).nextBytes(bytes)
        return ByteString.of(*bytes)
      }
    
      private fun snapshot(): ByteString {
        randomAccessFile!!.getChannel().force(false)
        val source = file!!.source().buffer()
        return source.readByteString()
      }
    
      private fun write(data: ByteString) {
        val sink = file!!.sink().buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

        webSocket.send("Hello...");
        webSocket.send("...World!");
        webSocket.send(ByteString.decodeHex("deadbeef"));
        webSocket.close(1000, "Goodbye, World!");
      }
    
      @Override public void onMessage(WebSocket webSocket, String text) {
        System.out.println("MESSAGE: " + text);
      }
    
      @Override public void onMessage(WebSocket webSocket, ByteString bytes) {
        System.out.println("MESSAGE: " + bytes.hex());
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 04 11:40:21 GMT 2024
    - 1.6K bytes
    - Viewed (0)
Back to top