Home / Function/ getDigestMatches() — spring-boot Function Reference

getDigestMatches() — spring-boot Function Reference

Architecture documentation for the getDigestMatches() function in ExportedImageTar.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  2f746efe_496a_ca3f_01f0_3944d0ba4c85["getDigestMatches()"]
  7ea6e489_52d4_6c61_4c09_9143fc147c75["withNestedIndexes()"]
  7ea6e489_52d4_6c61_4c09_9143fc147c75 -->|calls| 2f746efe_496a_ca3f_01f0_3944d0ba4c85
  1025f8b7_92f3_96da_aff2_5927468db700["getManifestLists()"]
  1025f8b7_92f3_96da_aff2_5927468db700 -->|calls| 2f746efe_496a_ca3f_01f0_3944d0ba4c85
  0ac86508_a23f_eb35_a6e7_2e565d32c734["getManifests()"]
  0ac86508_a23f_eb35_a6e7_2e565d32c734 -->|calls| 2f746efe_496a_ca3f_01f0_3944d0ba4c85
  8d709dfe_a2af_b53b_88aa_92785c0109e7["openTar()"]
  2f746efe_496a_ca3f_01f0_3944d0ba4c85 -->|calls| 8d709dfe_a2af_b53b_88aa_92785c0109e7
  b3171812_ab1f_87c4_a83a_2a91e929e461["getName()"]
  2f746efe_496a_ca3f_01f0_3944d0ba4c85 -->|calls| b3171812_ab1f_87c4_a83a_2a91e929e461
  style 2f746efe_496a_ca3f_01f0_3944d0ba4c85 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/ExportedImageTar.java lines 199–218

		private static <T> List<T> getDigestMatches(Path tarFile, Set<String> digests,
				ThrowingFunction<InputStream, T> factory) throws IOException {
			if (digests.isEmpty()) {
				return Collections.emptyList();
			}
			Set<String> names = digests.stream()
				.map(IndexLayerArchiveFactory::getEntryName)
				.collect(Collectors.toUnmodifiableSet());
			List<T> result = new ArrayList<>();
			try (TarArchiveInputStream tar = openTar(tarFile)) {
				TarArchiveEntry entry = tar.getNextEntry();
				while (entry != null) {
					if (names.contains(entry.getName())) {
						result.add(factory.apply(tar));
					}
					entry = tar.getNextEntry();
				}
			}
			return Collections.unmodifiableList(result);
		}

Subdomains

Frequently Asked Questions

What does getDigestMatches() do?
getDigestMatches() is a function in the spring-boot codebase.
What does getDigestMatches() call?
getDigestMatches() calls 2 function(s): getName, openTar.
What calls getDigestMatches()?
getDigestMatches() is called by 3 function(s): getManifestLists, getManifests, withNestedIndexes.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free