Package org.smallmind.nutsnbolts.zip
Enum CompressionType
- java.lang.Object
-
- java.lang.Enum<CompressionType>
-
- org.smallmind.nutsnbolts.zip.CompressionType
-
- All Implemented Interfaces:
Serializable,Comparable<CompressionType>
public enum CompressionType extends Enum<CompressionType>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcompress(Path sourceDir, Path outputFile)voidcompress(Path sourceDir, Path outputFile, Manifest manifest)voidexplode(Path compressedFile, Path outputDir)voidexplode(Path compressedFile, Path outputDir, Consumer<String> loggingConsumer)abstract ZipEntrygetEntry(String name)StringgetExtension()abstract ZipInputStreamgetInputStream(InputStream inputStream)abstract ZipOutputStreamgetOutputStream(OutputStream outputStream, Manifest manifest)static CompressionTypevalueOf(String name)Returns the enum constant of this type with the specified name.static CompressionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.voidwalk(Path compressedFile, Consumer<ZipEntry> entryConsumer)
-
-
-
Enum Constant Detail
-
JAR
public static final CompressionType JAR
-
ZIP
public static final CompressionType ZIP
-
-
Method Detail
-
values
public static CompressionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompressionType c : CompressionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getExtension
public String getExtension()
-
getInputStream
public abstract ZipInputStream getInputStream(InputStream inputStream) throws IOException
- Throws:
IOException
-
getOutputStream
public abstract ZipOutputStream getOutputStream(OutputStream outputStream, Manifest manifest) throws IOException
- Throws:
IOException
-
walk
public void walk(Path compressedFile, Consumer<ZipEntry> entryConsumer) throws IOException
- Throws:
IOException
-
compress
public void compress(Path sourceDir, Path outputFile) throws IOException
- Throws:
IOException
-
compress
public void compress(Path sourceDir, Path outputFile, Manifest manifest) throws IOException
- Throws:
IOException
-
explode
public void explode(Path compressedFile, Path outputDir) throws IOException
- Throws:
IOException
-
explode
public void explode(Path compressedFile, Path outputDir, Consumer<String> loggingConsumer) throws IOException
- Throws:
IOException
-
-