Example usage for java.net JarURLConnection getAttributes

List of usage examples for java.net JarURLConnection getAttributes

Introduction

In this page you can find the example usage for java.net JarURLConnection getAttributes.

Prototype

public Attributes getAttributes() throws IOException 

Source Link

Document

Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    URL url = new URL("jar:file:/c://my.jar!/");
    JarURLConnection conn = (JarURLConnection) url.openConnection();

    Attributes attrs = conn.getAttributes();

}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    URL url = new URL("jar:file:/c://my.jar!/");
    JarURLConnection conn = (JarURLConnection) url.openConnection();

    Attributes attrs = conn.getAttributes();
    Certificate[] certs = conn.getCertificates();

}