Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 250 for myobject (0.16 sec)

  1. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

        val body: ResponseBody =
          object : ResponseBody() {
            override fun contentType(): MediaType? {
              return null
            }
    
            override fun contentLength(): Long {
              return 5
            }
    
            override fun source(): BufferedSource {
              val source = Buffer().writeUtf8("hello")
              return object : ForwardingSource(source) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  2. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        assertThat(adapter.toDer(null)).isEqualTo(bytes)
        assertThat(adapter.fromDer(bytes)).isNull()
      }
    
      /** Make the claimed length of a nested object larger than the enclosing object. */
      @Test fun `large object inside small object`() {
        val bytes = "301b300d06092a864886f70d010101050003847fffffff000504030201".decodeHex()
        assertFailsWith<ProtocolException> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    import okio.Buffer
    import okio.ByteString
    
    /**
     * Encode and decode a model object like a [Long] or [Certificate] as DER bytes.
     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  4. okhttp-android/api/okhttp-android.api

    	public static synthetic fun androidLogging$default (Lokhttp3/logging/HttpLoggingInterceptor$Companion;ILjava/lang/String;ILjava/lang/Object;)Lokhttp3/logging/HttpLoggingInterceptor;
    	public static synthetic fun androidLogging$default (Lokhttp3/logging/LoggingEventListener$Companion;ILjava/lang/String;ILjava/lang/Object;)Lokhttp3/logging/LoggingEventListener$Factory;
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 1.3K bytes
    - Viewed (1)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/ObjectIdentifiers.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    /** ASN.1 object identifiers used internally by this implementation. */
    internal object ObjectIdentifiers {
      const val EC_PUBLIC_KEY = "1.2.840.10045.2.1"
      const val SHA256_WITH_ECDSA = "1.2.840.10045.4.3.2"
      const val RSA_ENCRYPTION = "1.2.840.113549.1.1.1"
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  6. okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/DecompressionBombChecker.kt

    internal class DecompressionBombChecker(
      private val maxRatio: Long,
    ) {
      private var inputByteCount = 0L
      private var outputByteCount = 0L
    
      fun wrapInput(source: Source): Source {
        return object : ForwardingSource(source) {
          override fun read(
            sink: Buffer,
            byteCount: Long,
          ): Long {
            val result = super.read(sink, byteCount)
            if (result == -1L) return result
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 29 22:50:20 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt

          // Enable ALPN.
          sslParameters.applicationProtocols = Platform.alpnProtocolNames(protocols).toTypedArray()
    
          bcSocket.parameters = sslParameters
        }
      }
    
      companion object {
        val factory =
          object : DeferredSocketAdapter.Factory {
            override fun matchesSocket(sslSocket: SSLSocket): Boolean {
              return BouncyCastlePlatform.isSupported && sslSocket is BCSSLSocket
            }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        enableProtocol(Protocol.HTTP_1_1)
    
        server.enqueue(MockResponse(code = 200, body = "Req1"))
        server.enqueue(MockResponse(code = 200, body = "Req2"))
    
        val eventListener =
          object : EventListener() {
            var socket: SSLSocket? = null
            var closed = false
    
            override fun connectionAcquired(
              call: Call,
              connection: Connection,
            ) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  9. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

      fun close() {
        val okHttpClient = client as OkHttpClient
        okHttpClient.connectionPool.evictAll() // Close any persistent connections.
        okHttpClient.dispatcher.executorService.shutdownNow()
      }
    
      companion object {
        internal const val NAME = "okcurl"
        internal const val DEFAULT_TIMEOUT = -1
    
        private fun versionString(): String? {
          val prop = Properties()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  10. okhttp-coroutines/src/main/kotlin/okhttp3/JvmCallExtensions.kt

    suspend fun Call.executeAsync(): Response =
      suspendCancellableCoroutine { continuation ->
        continuation.invokeOnCancellation {
          this.cancel()
        }
        this.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              continuation.resumeWithException(e)
            }
    
            override fun onResponse(
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Fri Apr 05 11:25:23 GMT 2024
    - 1.4K bytes
    - Viewed (0)
Back to top