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

writeTo() — spring-boot Function Reference

Architecture documentation for the writeTo() function in LoaderZipEntries.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  d649de22_92b1_cb62_1692_93c40663f43b["writeTo()"]
  07361a58_0598_5598_ca84_1f4c7fd6643f["getResourceAsStream()"]
  d649de22_92b1_cb62_1692_93c40663f43b -->|calls| 07361a58_0598_5598_ca84_1f4c7fd6643f
  01cda68d_f67d_5123_b4a6_d241cd1504d7["writeDirectory()"]
  d649de22_92b1_cb62_1692_93c40663f43b -->|calls| 01cda68d_f67d_5123_b4a6_d241cd1504d7
  20627f24_730b_a08e_c9c6_16df61f85ab7["addDirectory()"]
  d649de22_92b1_cb62_1692_93c40663f43b -->|calls| 20627f24_730b_a08e_c9c6_16df61f85ab7
  e49709a0_f099_523c_d539_318900c2c4ab["writeFile()"]
  d649de22_92b1_cb62_1692_93c40663f43b -->|calls| e49709a0_f099_523c_d539_318900c2c4ab
  f4a2d362_966b_9086_c43f_2803bb7d8330["addFile()"]
  d649de22_92b1_cb62_1692_93c40663f43b -->|calls| f4a2d362_966b_9086_c43f_2803bb7d8330
  style d649de22_92b1_cb62_1692_93c40663f43b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LoaderZipEntries.java lines 56–74

	WrittenEntries writeTo(ZipArchiveOutputStream out) throws IOException {
		WrittenEntries written = new WrittenEntries();
		try (ZipInputStream loaderJar = new ZipInputStream(
				getResourceAsStream("/META-INF/loader/spring-boot-loader.jar"))) {
			java.util.zip.ZipEntry entry = loaderJar.getNextEntry();
			while (entry != null) {
				if (entry.isDirectory() && !entry.getName().equals("META-INF/")) {
					writeDirectory(new ZipArchiveEntry(entry), out);
					written.addDirectory(entry);
				}
				else if (entry.getName().endsWith(".class") || entry.getName().startsWith("META-INF/services/")) {
					writeFile(new ZipArchiveEntry(entry), loaderJar, out);
					written.addFile(entry);
				}
				entry = loaderJar.getNextEntry();
			}
		}
		return written;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does writeTo() do?
writeTo() is a function in the spring-boot codebase.
What does writeTo() call?
writeTo() calls 5 function(s): addDirectory, addFile, getResourceAsStream, writeDirectory, writeFile.

Analyze Your Own Codebase

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

Try Supermodel Free