Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for adapter (0.03 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        val sequenceOf = listOf(7L, 8L, 9L)
        val adapter = Adapters.INTEGER_AS_LONG.asSequenceOf()
        assertThat(adapter.fromDer(bytes)).isEqualTo(sequenceOf)
        assertThat(adapter.toDer(sequenceOf)).isEqualTo(bytes)
      }
    
      @Test fun `point with only x set`() {
        val bytes = "3003800109".decodeHex()
        val point = Point(9L, null)
        assertThat(Point.ADAPTER.fromDer(bytes)).isEqualTo(point)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  2. android-test/src/test/kotlin/okhttp/android/test/AndroidSocketAdapterTest.kt

        assertTrue(adapter.matchesSocket(sslSocket))
    
        adapter.configureTlsExtensions(sslSocket, null, listOf(HTTP_2, HTTP_1_1))
        // not connected
        assertNull(adapter.getSelectedProtocol(sslSocket))
      }
    
      @Test
      fun testMatchesSupportedAndroidSocketFactory() {
        assumeTrue(adapter is StandardAndroidSocketAdapter)
    
        assertTrue(adapter.matchesSocketFactory(context.socketFactory))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

     */
    internal interface DerAdapter<T> {
      /** Returns true if this adapter can read [header] in a choice. */
      fun matches(header: DerHeader): Boolean
    
      /**
       * Returns a value from this adapter.
       *
       * This must always return a value, though it doesn't necessarily need to consume data from
       * [reader]. For example, if the reader's peeked tag isn't readable by this adapter, it may return
       * a default value.
       *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

       * ```
       */
      private val attributeTypeAndValue: BasicDerAdapter<AttributeTypeAndValue> =
        Adapters.sequence(
          "AttributeTypeAndValue",
          Adapters.OBJECT_IDENTIFIER,
          Adapters.any(
            String::class to Adapters.UTF8_STRING,
            Nothing::class to Adapters.PRINTABLE_STRING,
            AnyValue::class to Adapters.ANY_VALUE,
          ),
          decompose = {
            listOf(
              it.type,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 13.6K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/log/Logger.java

            });
            initialized = true;
        }
    
        /**
         * Returns the logger adapter factory.
         * <p>
         * If Commons Logging is available, returns a factory for using Commons Logging.
         * If not available, returns a factory for using java.util.logging logger.
         * </p>
         *
         * @return the logger adapter factory
         */
        protected static LoggerAdapterFactory getLoggerAdapterFactory() {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

        }
        return new ListenableFutureAdapter<>(future, executor);
      }
    
      /**
       * An adapter to turn a {@link Future} into a {@link ListenableFuture}. This will wait on the
       * future to finish, and when it completes, run the listeners. This implementation will wait on
       * the source future indefinitely, so if the source future never completes, the adapter will never
       * complete either.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/log/LoggerAdapter.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.log;
    
    /**
     * Adapter for using any logging framework.
     *
     * @author koichik
     */
    interface LoggerAdapter {
    
        boolean isFatalEnabled();
    
        void fatal(String message);
    
        void fatal(String message, Throwable t);
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt

    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class ParseResponseWithMoshi {
      private val client = OkHttpClient()
      private val moshi = Moshi.Builder().build()
      private val gistJsonAdapter = moshi.adapter(Gist::class.java)
    
      fun run() {
        val request =
          Request
            .Builder()
            .url("https://api.github.com/gists/c2a7c39532239ff261be")
            .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/collection/EnumerationIterator.java

    import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull;
    
    import java.util.Enumeration;
    import java.util.Iterator;
    
    import org.codelibs.core.exception.ClUnsupportedOperationException;
    
    /**
     * Adapter to convert an {@link Enumeration} to an {@link Iterator}.
     *
     * @author shot
     * @param <T> the element type
     */
    public class EnumerationIterator<T> implements Iterator<T> {
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  10. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

              @FromJson fun byteStringFromJson(json: String) = json.decodeHex()
            },
          ).add(KotlinJsonAdapterFactory())
          .build()
      private val STORY_JSON_ADAPTER = MOSHI.adapter(Story::class.java)
    
      private val fileSystem = FileSystem.SYSTEM
    
      private fun readStory(source: BufferedSource): Story = STORY_JSON_ADAPTER.fromJson(source)!!
    
      private fun readStory(file: Path): Story {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.3K bytes
    - Viewed (0)
Back to top