All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.builder.resolver.ZipResolver

java.lang.Object
   |
   +----com.sun.wizards.builder.resolver.ZipResolver

public class ZipResolver
extends Object
implements ResourceResolver
A resolver that can look in a zip file.


Constructor Index

 o ZipResolver(ZipFile)
Create a ZipResolver that looks in the specified zip file.

Method Index

 o main(String[])
 o resolveResource(String, String, byte[])
Resolves resources from the zip file.
 o setExtensions(String, String[])
Adds extensions for the specified type.

Constructors

 o ZipResolver
 public ZipResolver(ZipFile zipFile)
Create a ZipResolver that looks in the specified zip file.

Parameters:
zipFile - The file to look in

Methods

 o setExtensions
 public void setExtensions(String type,
                           String extensions[])
Adds extensions for the specified type. If the type does not exist, it is created. If the type does exist, the extensions are added to the list.

Parameters:
type - The type of resources to be found using the extensions
extensions - A list of extensions.
 o resolveResource
 public ResourceInputStream resolveResource(String type,
                                            String name,
                                            byte extData[])
Resolves resources from the zip file. This method provides the core functionality of the ZipResolver. The resource name is transformed into a relative filename (for example, on unix, "com.sun.wizards.myImage" of type "Images" becomes "com/sun/wizards/core/Task{.gif, .jpg, .jpeg, .jfif}") and the zipfile is searched for the name

Parameters:
type - The type of the requested resource
name - The name of the requested resource in dot notation (i.e. "com.sun.wizards.core.Task")
extData - Any extra data that was specified for this resource in the ResourceCollection. This can be ignored in many circumstances, unless an object implementing this interface is expecting certain extra data during a request, or needs the extra data to distinguish whether to resolver a particular resource or not.
Returns:
The requested resource, or null if the resource could not be found
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index