IoSupplier .java

net.minecraft.server.packs.resources.IoSupplier (interface, 22 lines): interface declaring 3 methods. members: create, get. ann: @FunctionalInterface.

net.minecraft.server.packs.resourcesinterface22 linesserver546 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

IoSupplier.java22 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.server.packs.resources;
2
3
import java.io.IOException;
4
import java.io.InputStream;
5
import java.nio.file.Files;
6
import java.nio.file.Path;
7
import java.util.zip.ZipEntry;
8
import java.util.zip.ZipFile;
9
10
@FunctionalInterface
11
public interface IoSupplier<T> {
12
	static IoSupplier<InputStream> create(final Path path) {
13
		return () -> Files.newInputStream(path);
14
	}
15
16
	static IoSupplier<InputStream> create(final ZipFile zipFile, final ZipEntry entry) {
17
		return () -> zipFile.getInputStream(entry);
18
	}
19
20
	T get() throws IOException;
21
}
22

Decompiled Minecraft 26.3 source of IoSupplier (net/minecraft/server/packs/resources/IoSupplier.java) with Mojang official mappings, stored verbatim on the site.