Returns a new instance of a unpacker engine.
The implementation of the unpacker engine is defined by the system
property {@code 'java.util.jar.Pack200.Unpacker'}. If this system
property is defined an instance of the specified class is returned,
otherwise the system's default implementation is returned.
return (Unpacker) AccessController
.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
String className = System
.getProperty(SYSTEM_PROPERTY_UNPACKER,
"org.apache.harmony.archive.internal.pack200.Pack200UnpackerAdapter");//$NON-NLS-1$
try {
return ClassLoader.getSystemClassLoader()
.loadClass(className).newInstance();
} catch (Exception e) {
throw new Error("Can't load class " + className, e);
}
}
});