Package net.minecraft.util
Class ZipCompressor
java.lang.Object
net.minecraft.util.ZipCompressor
- All Implemented Interfaces:
- Closeable,- AutoCloseable
A ZIP compressor builds up a ZIP file. It completes the ZIP file when it is
 closed. All its methods and constructors throw
 
UncheckedIOException when an I/O error occurs.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voidCopies asourcefile to thetargetpath within the ZIP.voidCopies thesourcefile or directory to the root of the ZIP.voidWrites thecontent, in UTF-8 encoding, to thetargetpath within the ZIP.
- 
Field Details- 
LOGGER- Mappings:
- Namespace - Name - Mixin selector - named - LOGGER- Lnet/minecraft/util/ZipCompressor;LOGGER:Lorg/slf4j/Logger;- intermediary - field_33864- Lnet/minecraft/class_6397;field_33864:Lorg/slf4j/Logger;- official - a- Lazj;a:Lorg/slf4j/Logger;
 
- 
file- Mappings:
- Namespace - Name - Mixin selector - named - file- Lnet/minecraft/util/ZipCompressor;file:Ljava/nio/file/Path;- intermediary - field_33865- Lnet/minecraft/class_6397;field_33865:Ljava/nio/file/Path;- official - b- Lazj;b:Ljava/nio/file/Path;
 
- 
temp- Mappings:
- Namespace - Name - Mixin selector - named - temp- Lnet/minecraft/util/ZipCompressor;temp:Ljava/nio/file/Path;- intermediary - field_33866- Lnet/minecraft/class_6397;field_33866:Ljava/nio/file/Path;- official - c- Lazj;c:Ljava/nio/file/Path;
 
- 
zip- Mappings:
- Namespace - Name - Mixin selector - named - zip- Lnet/minecraft/util/ZipCompressor;zip:Ljava/nio/file/FileSystem;- intermediary - field_33867- Lnet/minecraft/class_6397;field_33867:Ljava/nio/file/FileSystem;- official - d- Lazj;d:Ljava/nio/file/FileSystem;
 
 
- 
- 
Constructor Details- 
ZipCompressorCreates a ZIP compressor.- Parameters:
- file- the path of the ZIP file
- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/util/ZipCompressor;<init>(Ljava/nio/file/Path;)V- intermediary - <init>- Lnet/minecraft/class_6397;<init>(Ljava/nio/file/Path;)V- official - <init>- Lazj;<init>(Ljava/nio/file/Path;)V
 
 
- 
- 
Method Details- 
writeWrites thecontent, in UTF-8 encoding, to thetargetpath within the ZIP.The targetshould be a relative path, as it will be resolved against the root of the ZIP.- Parameters:
- target- the target path in the ZIP
- content- the file content to write in UTF-8
- Mappings:
- Namespace - Name - Mixin selector - named - write- Lnet/minecraft/util/ZipCompressor;write(Ljava/nio/file/Path;Ljava/lang/String;)V- intermediary - method_37163- Lnet/minecraft/class_6397;method_37163(Ljava/nio/file/Path;Ljava/lang/String;)V- official - a- Lazj;a(Ljava/nio/file/Path;Ljava/lang/String;)V
 
- 
copyCopies asourcefile to thetargetpath within the ZIP.If the sourceis a directory, then an empty directory would be copied. Thetargetshould be a relative path, as it will be resolved against the root of the ZIP.- Parameters:
- target- the target path in the ZIP
- source- the source file to copy
- Mappings:
- Namespace - Name - Mixin selector - named - copy- Lnet/minecraft/util/ZipCompressor;copy(Ljava/nio/file/Path;Ljava/io/File;)V- intermediary - method_37162- Lnet/minecraft/class_6397;method_37162(Ljava/nio/file/Path;Ljava/io/File;)V- official - a- Lazj;a(Ljava/nio/file/Path;Ljava/io/File;)V
 
- 
copyAllCopies thesourcefile or directory to the root of the ZIP.- Parameters:
- source- the source file or directory to copy
- Mappings:
- Namespace - Name - Mixin selector - named - copyAll- Lnet/minecraft/util/ZipCompressor;copyAll(Ljava/nio/file/Path;)V- intermediary - method_37161- Lnet/minecraft/class_6397;method_37161(Ljava/nio/file/Path;)V- official - a- Lazj;a(Ljava/nio/file/Path;)V
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 
-