Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 92 for ByteString (0.24 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. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

        ByteString state = randomToken();
        synchronized (this) {
          listeners.put(state, listener);
        }
    
        return slackApi.authorizeUrl(scopes, redirectUrl(), state, team);
      }
    
      private ByteString randomToken() {
        byte[] bytes = new byte[16];
        secureRandom.nextBytes(bytes);
        return ByteString.of(bytes);
      }
    
      private HttpUrl redirectUrl() {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top