Code example for Attributes

Methods: get

    public void test_getAttributes() throws Exception { 
        URL u = createContent("lf.jar", "swt.dll");
        juc = (JarURLConnection) u.openConnection();
        java.util.jar.Attributes a = juc.getAttributes();
        assertEquals("Returned incorrect Attributes", "SHA MD5", a
                .get(new java.util.jar.Attributes.Name("Digest-Algorithms")));
        URL invURL = createContent("InvalidJar.jar", "Test.class");
        JarURLConnection juConn = (JarURLConnection) invURL.openConnection();
        try { 
            fail("IOException was not thrown.");
        } catch( io) {
    public void test_getCertificates() throws Exception { 
        URL u = createContent("TestCodeSigners.jar", "Test.class");
Connect your IDE to all the code out there  Get Codota for Java