public class Pack200Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
normalize(File
Normalizes a JAR archive in-place so it can be safely signed and packed.
|
static void |
normalize(File
Normalizes a JAR archive so it can be safely signed and packed.
|
static void |
normalize(File
Normalizes a JAR archive so it can be safely signed and packed.
|
static void |
normalize(File
Normalizes a JAR archive in-place so it can be safely signed and packed.
|
public static void normalize(Filejar) throws IOException
As stated in Pack200.Packer's javadocs applying a Pack200 compression to a JAR archive will in general make its sigantures invalid. In order to prepare a JAR for signing it should be "normalized" by packing and unpacking it. This is what this method does.
Note this methods implicitly sets the segment length to -1.
jar - the JAR archive to normalize
IOException
public static void normalize(Filejar, Map <String ,String > props) throws IOException
As stated in Pack200.Packer's javadocs applying a Pack200 compression to a JAR archive will in general make its sigantures invalid. In order to prepare a JAR for signing it should be "normalized" by packing and unpacking it. This is what this method does.
jar - the JAR archive to normalize
props - properties to set for the pack operation. This method will implicitly set the segment limit to -1.
IOException
public static void normalize(Filefrom, File to) throws IOException
As stated in Pack200.Packer's javadocs applying a Pack200 compression to a JAR archive will in general make its sigantures invalid. In order to prepare a JAR for signing it should be "normalized" by packing and unpacking it. This is what this method does.
This method does not replace the existing archive but creates a new one.
Note this methods implicitly sets the segment length to -1.
from - the JAR archive to normalize
to - the normalized archive
IOException
public static void normalize(Filefrom, File to, Map <String ,String > props) throws IOException
As stated in Pack200.Packer's javadocs applying a Pack200 compression to a JAR archive will in general make its sigantures invalid. In order to prepare a JAR for signing it should be "normalized" by packing and unpacking it. This is what this method does.
This method does not replace the existing archive but creates a new one.
from - the JAR archive to normalize
to - the normalized archive
props - properties to set for the pack operation. This method will implicitly set the segment limit to -1.
IOException