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.apache.cactus.integration.ant.deployment
Interface JarArchive

All Known Subinterfaces:
  EarArchive, WarArchive

All Known Implementing Classes:
  DefaultEarArchive, DefaultJarArchive, DefaultWarArchive

public interface JarArchive

Provide convenient methods to read information from a Jar archive.

Since:
  Cactus 1.5
Version:
  $Id: JarArchive.java 238812 2004-02-29 10:21:34Z vmassol $

Method Summary
`boolean` | `containsClass(java.lang.String theClassName)` Returns whether a class of the specified name is contained in the archive.
`java.lang.String` | `findResource(java.lang.String theName)` Returns the full path of a named resource in the archive.
`java.io.InputStream` | `getResource(java.lang.String thePath)` Returns a resource from the archive as input stream.
`java.util.List` | `getResources(java.lang.String thePath)` Returns the list of resources in the specified directory.

Method Detail

### containsClass

    public boolean containsClass(java.lang.String theClassName)
                          throws java.io.IOException

  Returns whether a class of the specified name is contained in the archive.

  Parameters:
    `theClassName` - The name of the class to search for
  Returns:
    Whether the class was found
  Throws:
    `java.io.IOException` - If an I/O error occurred reading the archive

### findResource

    public java.lang.String findResource(java.lang.String theName)
                                  throws java.io.IOException

  Returns the full path of a named resource in the archive.

  Parameters:
    `theName` - The name of the resource
  Returns:
    The full path to the resource inside the archive
  Throws:
    `java.io.IOException` - If an I/O error occurred reading the archive

### getResource

    public java.io.InputStream getResource(java.lang.String thePath)
                                    throws java.io.IOException

  Returns a resource from the archive as input stream.

  Parameters:
    `thePath` - The path to the resource in the archive
  Returns:
    An input stream containing the specified resource, or `null` if the resource was not found in the JAR
  Throws:
    `java.io.IOException` - If an I/O error occurs

### getResources

    public java.util.List getResources(java.lang.String thePath)
                                throws java.io.IOException

  Returns the list of resources in the specified directory.

  Parameters:
    `thePath` - The directory
  Returns:
    The list of resources
  Throws:
    `java.io.IOException` - If an I/O error occurs

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 © 2000-2004 Apache Software Foundation. All Rights Reserved.