Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.net.protocol.njar
Class Handler

    java.lang.Object
      java.net.URLStreamHandler
          org.jboss.net.protocol.njar.Handler

public class Handler
extends URLStreamHandler

A protocol handler for the n(ested)jar protocol.

This is class allows you to use the njar: URL protocol. It is very similar to it's jar: cusin. The difference being that jars can be nested.

An example of how to use this class is:

        URL url = new URL("njar:njar:file:c:/test1.zip^/test2.zip^/hello.txt");
        url.openStream();

Please be aware that the njar protocol caches it's jar in temporary storage when connections are opened into them. So for the above example, 2 files would cached a temp files names similar to nested-xxxx.jar

Version:
  `$Revision: 1.8 $`
Author:
  Hiram Chirino

Field Summary
`static String` | `JAR_SEPARATOR`
`static String` | `NJAR_SEPARATOR`
`static String` | `PROTOCOL`
`protected Map` | `savedJars`

Constructor Summary
`Handler()`

Method Summary
`static URL` | `njarToFile(URL url)`
`URLConnection` | `openConnection(URL url)`

Methods inherited from class java.net.URLStreamHandler
`equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, parseURL, sameFile, setURL, setURL, toExternalForm`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROTOCOL

    public static final String PROTOCOL

See Also:
  Constant Field Values

### NJAR_SEPARATOR

    public static final String NJAR_SEPARATOR

See Also:
  Constant Field Values

### JAR_SEPARATOR

    public static final String JAR_SEPARATOR

See Also:
  Constant Field Values

### savedJars

    protected Map savedJars

Constructor Detail

### Handler

    public Handler()

Method Detail

### openConnection

    public URLConnection openConnection(URL url)
                                 throws IOException

  Throws:
    `IOException`

### njarToFile

    public static URL njarToFile(URL url)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.