Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 69 for writeSmallInt (0.16 sec)

  1. platforms/core-configuration/dependency-management-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/dm/AttributeContainerCodecs.kt

        val name = readString()
        val type = readClass()
        return Attribute.of(name, type.uncheckedCast())
    }
    
    
    private
    suspend fun WriteContext.writeManaged(value: Managed) {
        writeSmallInt(value.factoryId)
        writeClass(value.publicType())
        write(value.unpackState())
    }
    
    
    private
    suspend fun ReadContext.readManaged(managedFactories: ManagedFactoryRegistry): Any {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 18:56:44 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/AbstractCodecTest.groovy

        }
    
        def "can encode and decode a small int"() {
            expect:
            def bytesA = encode { Encoder encoder ->
                encoder.writeSmallInt(a as int)
            }
            def bytesB = encode { Encoder encoder ->
                encoder.writeSmallInt(b as int)
            }
            decode(bytesA) { Decoder decoder ->
                assert decoder.readSmallInt() == a
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  3. platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/kryo/StringDeduplicatingKryoBackedEncoder.java

            output.writeLong(value, true);
        }
    
        @Override
        public void writeInt(int value) {
            output.writeInt(value);
        }
    
        @Override
        public void writeSmallInt(int value) {
            output.writeInt(value, true);
        }
    
        @Override
        public void writeShort(short value) throws IOException {
            output.writeShort(value);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/Codec.kt

        val id = identities.getId(reference)
        if (id != null) {
            writeSmallInt(id)
        } else {
            val newId = identities.putInstance(reference)
            writeSmallInt(newId)
            circularReferences.enter(reference)
            try {
                encode(reference)
            } finally {
                circularReferences.leave(reference)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. platforms/software/dependency-management/src/main/java/org/gradle/internal/resolve/caching/DesugaringAttributeContainerSerializer.java

                }
            }
            return attributes;
        }
    
        @Override
        public void write(Encoder encoder, AttributeContainer container) throws IOException {
            encoder.writeSmallInt(container.keySet().size());
            for (Attribute<?> attribute : container.keySet()) {
                encoder.writeString(attribute.getName());
                if (attribute.getType().equals(Boolean.class)) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  6. platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/history/impl/FingerprintMapSerializer.java

            }
        }
    
        @Override
        public void write(Encoder encoder, Map<String, FileSystemLocationFingerprint> value) throws Exception {
            encoder.writeSmallInt(value.size());
            for (String key : value.keySet()) {
                encoder.writeString(key);
                FileSystemLocationFingerprint fingerprint = value.get(key);
                writeFingerprint(encoder, fingerprint);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:46:15 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  7. platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/DefaultSerializerRegistryTest.groovy

        def intSerializer = Stub(Serializer) {
            read(_) >> { Decoder decoder ->
                return decoder.readSmallInt()
            }
            write(_, _) >> { Encoder encoder, Integer value ->
                encoder.writeSmallInt(value)
            }
        }
    
        def "can query whether type can be serialized"() {
            given:
            def registry = new DefaultSerializerRegistry()
            registry.register(Long, longSerializer)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/resolveengine/result/DesugaredAttributeContainerSerializer.java

                }
            }
            return attributes;
        }
    
        @Override
        public void write(Encoder encoder, AttributeContainer container) throws IOException {
            encoder.writeSmallInt(container.keySet().size());
            for (Attribute<?> attribute : container.keySet()) {
                encoder.writeString(attribute.getName());
                Class<?> type = attribute.getType();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Mar 12 02:21:10 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/isolation/IsolatedActionSerializer.kt

    }
    
    
    private
    class EnvironmentEncoder : ClassEncoder {
    
        private
        val refs = IdentityHashMap<Class<*>, Int>()
    
        override fun WriteContext.encodeClass(type: Class<*>) {
            writeSmallInt(refs.computeIfAbsent(type) { refs.size })
        }
    
        fun getResultingEnvironment(): Map<Int, Any> =
            refs.invert()
    }
    
    
    private
    class EnvironmentDecoder(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/modulecache/artifacts/DefaultModuleArtifactCache.java

                encoder.writeBinary(hash);
                if (!value.isMissing()) {
                    encoder.writeString(relativizeAndNormalizeFilePath(value.getCachedFile()));
                } else {
                    encoder.writeSmallInt(value.attemptedLocations().size());
                    for (String location : value.attemptedLocations()) {
                        encoder.writeString(location);
                    }
                }
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 8.2K bytes
    - Viewed (0)
Back to top