Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for withTypeHint (0.2 sec)

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

                }
    
                return@withTypeHint construct(list)
              }
            }
    
            override fun encode(
              writer: DerWriter,
              value: T,
            ) {
              val list = decompose(value)
              writer.withTypeHint {
                for (i in list.indices) {
                  val adapter = members[i] as DerAdapter<Any?>
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

      /** How many bytes to read before [peekHeader] should return false, or -1L for no limit. */
      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
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        sink.writeAll(content)
      }
    
      /**
       * Execute [block] with a new namespace for type hints. Type hints from the enclosing type are no
       * longer usable by the current type's members.
       */
      fun <T> withTypeHint(block: () -> T): T {
        typeHintStack.add(null)
        try {
          return block()
        } finally {
          typeHintStack.removeAt(typeHintStack.size - 1)
        }
      }
    
    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 (0)
Back to top