Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 102 for doDecode (0.17 sec)

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

    
    object ProxyCodec : EncodingProducer, Decoding {
        override fun encodingForType(type: Class<*>): Encoding? =
            ProxyEncoding.takeIf { Proxy.isProxyClass(type) }
    
        override suspend fun ReadContext.decode(): Any {
            val interfaces = readClassArray()
            val handler = read() as InvocationHandler
            return Proxy.newProxyInstance(interfaces.first().classLoader, interfaces, handler)
        }
    }
    
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 18:56:44 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/codecs/BeanSpecCodec.kt

     */
    class BeanSpec(val bean: Any)
    
    
    object BeanSpecCodec : Codec<BeanSpec> {
    
        override suspend fun WriteContext.encode(value: BeanSpec) =
            encodeBean(value.bean)
    
        override suspend fun ReadContext.decode(): BeanSpec =
            BeanSpec(decodeBean())
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 18:56:44 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  3. platforms/core-configuration/stdlib-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/stdlib/MethodCodec.kt

            writeClass(value.declaringClass)
            writeString(value.name)
            writeClassArray(value.parameterTypes)
        }
    
        override suspend fun ReadContext.decode(): Method? {
            val declaringClass = readClass()
            val methodName = readString()
            val parameterTypes = readClassArray()
            return declaringClass.getDeclaredMethod(methodName, *parameterTypes)
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat May 25 20:43:52 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  4. src/encoding/pem/pem.go

    var pemEnd = []byte("\n-----END ")
    var pemEndOfLine = []byte("-----")
    var colon = []byte(":")
    
    // Decode will find the next PEM formatted block (certificate, private key
    // etc) in the input. It returns that block and the remainder of the input. If
    // no PEM data is found, p is nil and the whole of the input is returned in
    // rest.
    func Decode(data []byte) (p *Block, rest []byte) {
    	// pemStart begins with a newline. However, at the very beginning of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/ApiTextResourceAdapterCodec.kt

        override suspend fun WriteContext.encode(value: ApiTextResourceAdapter) {
            writeString((value.inputProperties as URI).toASCIIString())
        }
    
        override suspend fun ReadContext.decode(): ApiTextResourceAdapter =
            textResourceFactory.fromInsecureUri(readString()) as ApiTextResourceAdapter
    
        private
        val ReadContext.textResourceFactory: TextResourceFactory
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/TaskInAnotherBuildCodec.kt

        override suspend fun WriteContext.encode(value: TaskInAnotherBuild) {
            value.run {
                writeString(taskPath)
                write(targetBuild)
            }
        }
    
        override suspend fun ReadContext.decode(): TaskInAnotherBuild {
            val taskPath = readString()
            val targetBuild = readNonNull<BuildIdentifier>()
            return TaskInAnotherBuild.lazy(
                taskPath,
                targetBuild,
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/codecs/DelegatingCodec.kt

        override suspend fun WriteContext.encode(value: T) {
            // Delegate to the other codec
            withCodec(userTypesCodec) {
                write(value)
            }
        }
    
        override suspend fun ReadContext.decode(): T {
            // Delegate to the other codec
            return withCodec(userTypesCodec) {
                readNonNull()
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 18:56:44 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  8. platforms/core-configuration/guava-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/guava/ImmutableListCodec.kt

    
    object ImmutableListCodec : Codec<ImmutableList<Any>> {
    
        override suspend fun WriteContext.encode(value: ImmutableList<Any>) {
            writeCollection(value)
        }
    
        override suspend fun ReadContext.decode(): ImmutableList<Any>? {
            val size = readSmallInt()
            val builder = ImmutableList.builderWithExpectedSize<Any>(size)
            for (i in 0 until size) {
                val value = readNonNull<Any>()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat May 25 20:43:52 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/OrdinalNodeCodec.kt

    ) : Codec<OrdinalNode> {
        override suspend fun WriteContext.encode(value: OrdinalNode) {
            writeEnum(value.type)
            writeInt(value.ordinalGroup.ordinal)
        }
    
        override suspend fun ReadContext.decode(): OrdinalNode {
            val ordinalType = readEnum<OrdinalNode.Type>()
            val ordinal = readInt()
            return ordinalGroups.group(ordinal).locationsNode(ordinalType)
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  10. platforms/core-configuration/dependency-management-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/dm/transform/TransformedProjectArtifactSetCodec.kt

            encodePreservingSharedIdentityOf(value) {
                write(value.targetVariant)
                writeCollection(value.transformedArtifacts)
            }
        }
    
        override suspend fun ReadContext.decode(): TransformedProjectArtifactSet {
            return decodePreservingSharedIdentity {
                val targetVariant = readNonNull<ComponentVariantIdentifier>()
                val nodes: List<TransformStepNode> = readList().uncheckedCast()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 18:56:44 UTC 2024
    - 2.1K bytes
    - Viewed (0)
Back to top