Package net.fabricmc.loom.util
Class ZipUtils
java.lang.Object
net.fabricmc.loom.util.ZipUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic booleanstatic voidstatic voidstatic inttransform(Path zip, Collection<Pair<String,ZipUtils.UnsafeUnaryOperator<byte[]>>> transforms)static inttransform(Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<byte[]>> transforms)static intstatic <T> inttransformJson(Class<T> typeOfT, Path zip, Collection<Pair<String,ZipUtils.UnsafeUnaryOperator<T>>> transforms)static <T> inttransformJson(Class<T> typeOfT, Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<T>> transforms)static <T> inttransformJson(Class<T> typeOfT, Path zip, Stream<Pair<String,ZipUtils.UnsafeUnaryOperator<T>>> transforms)static <T> inttransformMapped(Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<T>> transforms, Function<byte[],T> deserializer, Function<T,byte[]> serializer)static inttransformString(Path zip, Collection<Pair<String,ZipUtils.UnsafeUnaryOperator<String>>> transforms)static inttransformString(Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<String>> transforms)static inttransformString(Path zip, Stream<Pair<String,ZipUtils.UnsafeUnaryOperator<String>>> transforms)static byte[]static voidstatic byte @Nullable []unpackNullable(Path zip, String path)
-
Constructor Details
-
ZipUtils
public ZipUtils()
-
-
Method Details
-
contains
-
unpackAll
- Throws:
IOException
-
unpackNullable
- Throws:
IOException
-
unpack
- Throws:
IOException
-
pack
- Throws:
IOException
-
add
- Throws:
IOException
-
add
- Throws:
IOException
-
replace
- Throws:
IOException
-
transformString
public static int transformString(Path zip, Collection<Pair<String,ZipUtils.UnsafeUnaryOperator<String>>> transforms) throws IOException- Throws:
IOException
-
transformString
public static int transformString(Path zip, Stream<Pair<String,ZipUtils.UnsafeUnaryOperator<String>>> transforms) throws IOException- Throws:
IOException
-
transformString
public static int transformString(Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<String>> transforms) throws IOException- Throws:
IOException
-
transformJson
public static <T> int transformJson(Class<T> typeOfT, Path zip, Collection<Pair<String,ZipUtils.UnsafeUnaryOperator<T>>> transforms) throws IOException- Throws:
IOException
-
transformJson
public static <T> int transformJson(Class<T> typeOfT, Path zip, Stream<Pair<String,ZipUtils.UnsafeUnaryOperator<T>>> transforms) throws IOException- Throws:
IOException
-
transformJson
public static <T> int transformJson(Class<T> typeOfT, Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<T>> transforms) throws IOException- Throws:
IOException
-
transform
public static int transform(Path zip, Collection<Pair<String,ZipUtils.UnsafeUnaryOperator<byte[]>>> transforms) throws IOException- Throws:
IOException
-
transform
public static int transform(Path zip, Stream<Pair<String,ZipUtils.UnsafeUnaryOperator<byte[]>>> transforms) throws IOException- Throws:
IOException
-
transformMapped
public static <T> int transformMapped(Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<T>> transforms, Function<byte[],T> deserializer, Function<T,byte[]> serializer) throws IOException- Throws:
IOException
-
transform
public static int transform(Path zip, Map<String,ZipUtils.UnsafeUnaryOperator<byte[]>> transforms) throws IOException- Throws:
IOException
-