Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for adapters (1.15 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

            // will include a tag and length header as a prefix.
            val adapter = chooser(writer.typeHint) as DerAdapter<Any?>?
            when {
              adapter != null -> adapter.toDer(writer, value)
              else -> writer.writeOctetString(value as ByteString)
            }
          }
    
          override fun fromDer(reader: DerReader): Any? {
            val adapter = chooser(reader.typeHint) as DerAdapter<Any?>?
            return when {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt

     * hint for further adapters to process.
     *
     * Types like ANY and CHOICE that don't have a consistent tag cannot use this.
     */
    internal data class BasicDerAdapter<T>(
      private val name: String,
      /** The tag class this adapter expects, or -1 to match any tag class. */
      val tagClass: Int,
      /** The tag this adapter expects, or -1 to match any tag. */
      val tag: Long,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/log/JclLoggerAdapterFactory.java

     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.log;
    
    import org.apache.commons.logging.LogFactory;
    
    /**
     * Factory for creating adapters that use (Jakarta) Commons Logging loggers.
     *
     * @author koichik
     */
    class JclLoggerAdapterFactory implements LoggerAdapterFactory {
    
        @Override
        public LoggerAdapter getLoggerAdapter(final Class<?> clazz) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/AnyValue.kt

     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    import okio.ByteString
    
    /**
     * A value whose type is not specified statically. Use this with [Adapters.any] which will attempt
     * to resolve a concrete type.
     */
    internal data class AnyValue(
      var tagClass: Int,
      var tag: Long,
      var constructed: Boolean = false,
      var length: Long = -1L,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

      /** Type hints scoped to the call stack, manipulated with [pushTypeHint] and [popTypeHint]. */
      private val typeHintStack = mutableListOf<Any?>()
    
      /**
       * The type hint for the current object. Used to pick adapters based on other fields, such as
       * in extensions which have different types depending on their extension ID.
       */
      var typeHint: Any?
        get() = typeHintStack.lastOrNull()
        set(value) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/log/LoggerAdapterFactory.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.log;
    
    /**
     * Factory for creating logger adapters.
     *
     * @author koichik
     */
    interface LoggerAdapterFactory {
    
        LoggerAdapter getLoggerAdapter(Class<?> clazz);
    
        void releaseAll();
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 837 bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/log/JulLoggerAdapterFactory.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.log;
    
    /**
     * Factory for creating adapters that use java.util.logging loggers.
     *
     * @author koichik
     */
    class JulLoggerAdapterFactory implements LoggerAdapterFactory {
    
        @Override
        public LoggerAdapter getLoggerAdapter(final Class<?> clazz) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jun 19 09:12:22 UTC 2025
    - 1002 bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

      private var limit = -1L
    
      /** Type hints scoped to the call stack, manipulated with [withTypeHint]. */
      private val typeHintStack = mutableListOf<Any?>()
    
      /**
       * The type hint for the current object. Used to pick adapters based on other fields, such as
       * in extensions which have different types depending on their extension ID.
       */
      var typeHint: Any?
        get() = typeHintStack.lastOrNull()
        set(value) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
Back to top