Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for newPrimitiveHasher (0.26 sec)

  1. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/Hashing.java

            return DEFAULT.newHasher();
        }
    
        /**
         * Returns a new {@link PrimitiveHasher} based on the default hashing implementation.
         */
        public static PrimitiveHasher newPrimitiveHasher() {
            return DEFAULT.newPrimitiveHasher();
        }
    
        /**
         * Returns a hash code to use as a signature for a given type.
         */
        public static HashCode signature(Class<?> type) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:30 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/HashFunction.java

        /**
         * Returns the algorithm used for this hashing function.
         */
        String getAlgorithm();
    
        /**
         * Returns a primitive hasher using the hash function.
         */
        PrimitiveHasher newPrimitiveHasher();
    
        /**
         * Returns a prefixing hasher using the hash function.
         */
        Hasher newHasher();
    
        /**
         * Hash the given bytes using the hash function.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:43:29 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. subprojects/core/src/main/java/org/gradle/internal/hash/ChecksumHasher.java

            this.hashFunction = hashFunction;
        }
    
        @Override
        public HashCode hash(File file) {
            try {
                PrimitiveHasher hasher = hashFunction.newPrimitiveHasher();
                byte[] buffer = new byte[4096];
                int len;
                try (InputStream in = new FileInputStream(file)) {
                    while ((len = in.read(buffer)) >= 0) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 22 15:39:10 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  4. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/HashingOutputStream.java

        private final PrimitiveHasher hasher;
    
        public HashingOutputStream(HashFunction hashFunction, OutputStream out) {
            super(checkNotNull(out));
            this.hasher = checkNotNull(hashFunction.newPrimitiveHasher());
        }
    
        @Override
        public void write(int b) throws IOException {
            hasher.putByte((byte) b);
            out.write(b);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:43:29 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  5. platforms/software/resources/src/main/java/org/gradle/internal/resource/CachingTextResource.java

            return new StringReader(content);
        }
    
        private void maybeFetch() {
            if (content == null) {
                content = resource.getText();
                PrimitiveHasher hasher = Hashing.newPrimitiveHasher();
                hasher.putHash(SIGNATURE);
                hasher.putString(content);
                contentHash = hasher.hash();
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 3K bytes
    - Viewed (0)
  6. platforms/software/resources/src/main/java/org/gradle/internal/resource/StringTextResource.java

            return contents.toString();
        }
    
        @Override
        public HashCode getContentHash() throws ResourceException {
            if (contentHash == null) {
                PrimitiveHasher hasher = Hashing.newPrimitiveHasher();
                hasher.putHash(SIGNATURE);
                hasher.putString(getText());
                contentHash = hasher.hash();
            }
            return contentHash;
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  7. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/DefaultStreamHasher.java

        }
    
        private HashCode doHash(InputStream inputStream, OutputStream outputStream) throws IOException {
            byte[] buffer = takeBuffer();
            try {
                PrimitiveHasher hasher = Hashing.newPrimitiveHasher();
                hasher.putHash(SIGNATURE);
                while (true) {
                    int nread = inputStream.read(buffer);
                    if (nread < 0) {
                        break;
                    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:43:29 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  8. platforms/jvm/normalization-java/src/main/java/org/gradle/api/internal/changedetection/state/LineEndingNormalizingInputStreamHasher.java

        }
    
        /**
         * Returns empty if the file is detected to be a binary file
         */
        private Optional<HashCode> hash(InputStream inputStream) throws IOException {
            PrimitiveHasher hasher = Hashing.newPrimitiveHasher();
    
            hasher.putHash(SIGNATURE);
    
            try (BufferedInputStream input = new BufferedInputStream(CloseShieldInputStream.wrap(inputStream), BUFFER_SIZE)) {
                int peekAhead = -1;
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 15:09:49 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  9. platforms/software/resources/src/main/java/org/gradle/internal/resource/UriTextResource.java

            }
        }
    
        @Override
        public HashCode getContentHash() throws ResourceException {
            PrimitiveHasher hasher = Hashing.newPrimitiveHasher();
            hasher.putHash(SIGNATURE);
            hasher.putString(getText());
            return hasher.hash();
        }
    
        @Override
        public Reader getAsReader() {
            assertNoDirectory();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 11.8K bytes
    - Viewed (0)
Back to top