public static String getLicenseAgreement(final JarFile jar, final Map<String, String> manifestAttrs) {
        String licenseAgreement = null;

        if (manifestAttrs.isEmpty()) {
            return licenseAgreement;
        }

        String licenseAgreementPrefix = manifestAttrs.get(ArchiveUtils.LICENSE_AGREEMENT);

        LicenseProvider licenseProvider = (licenseAgreementPrefix != null) ? ZipLicenseProvider.createInstance(jar, licenseAgreementPrefix) : null;

        if (licenseProvider != null)
            licenseAgreement = new InstallLicenseImpl("", LicenseType.UNSPECIFIED, licenseProvider).getAgreement();

        return licenseAgreement;
    }
public static String getLicenseAgreement ( final JarFile jar , final Map < String , String > manifestAttrs ) { String licenseAgreement = null ; if ( manifestAttrs . isEmpty ( ) ) { return licenseAgreement ; } String licenseAgreementPrefix = manifestAttrs . get ( ArchiveUtils . LICENSE_AGREEMENT ) ; LicenseProvider licenseProvider = ( licenseAgreementPrefix != null ) ? ZipLicenseProvider . createInstance ( jar , licenseAgreementPrefix ) : null ; if ( licenseProvider != null ) licenseAgreement = new InstallLicenseImpl ( "" , LicenseType . UNSPECIFIED , licenseProvider ) . getAgreement ( ) ; return licenseAgreement ; }
Gets the license agreement for the jar file.

@param jar the jar file
@param manifestAttrs the manifest file for the jar file
@return the license agreement as a String