Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for encodingFor (0.1 sec)

  1. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/jos/JavaSerializationEncodingLookup.kt

        val encodings = ConcurrentHashMap<Class<*>, EncodingDetails>()
    
        /**
         * Returns the proper encoding provider for the given type, or null, if not covered by Java Object serialization.
         */
        fun encodingFor(type: Class<*>): Encoding? {
            return encodings.computeIfAbsent(type) { t -> calculateEncoding(t) }.encoding
        }
    
        private
        fun calculateEncoding(type: Class<*>): EncodingDetails {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/jos/JavaObjectSerializationCodec.kt

        override fun encodingForType(type: Class<*>): Encoding? =
            type.takeIf { Serializable::class.java.isAssignableFrom(it) }?.let { serializableType ->
                lookup.encodingFor(serializableType)
            }
    
        override suspend fun ReadContext.decode(): Any =
            decodePreservingIdentity { id ->
                when (readEnum<Format>()) {
                    Format.WriteObject -> {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top