Examples of JarURLConnection


Examples of java.net.JarURLConnection

    try
    {
      if (connection instanceof JarURLConnection)
      {
        JarURLConnection jarUrlConnection = (JarURLConnection)connection;
        URL jarFileUrl = jarUrlConnection.getJarFileURL();
        URLConnection jarFileConnection = jarFileUrl.openConnection();
        try
        {
          return jarFileConnection.getLastModified();
        }
View Full Code Here

Examples of org.codehaus.classworlds.uberjar.protocol.jar.JarUrlConnection

        throws Exception
    {
        URL url = buildUrl( "nested.jar",
                            "!/lib/a.jar!/a/A.class" );

        JarUrlConnection connection = new JarUrlConnection( url );

        String[] segments = connection.getSegments();

        assertEquals( 2,
                      segments.length );

        assertEquals( "/lib/a.jar",
                      segments[0] );

        assertEquals( "/a/A.class",
                      segments[1] );

        URL baseResource = connection.getBaseResource();

        assertTrue( baseResource.toExternalForm().startsWith( "file:" ) );
        assertTrue( baseResource.toExternalForm().endsWith( "nested.jar" ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.