private File extractFile(String fileName, JarFile containingJar, File dstDir)
			throws DeploymentException {

		ZipEntry zipFileEntry = containingJar.getEntry(fileName);
		logger.trace("Extracting file " + fileName + " from "
				+ containingJar.getName());
		if (zipFileEntry == null) {
			throw new DeploymentException("Error extracting jar file  "
					+ fileName + " from " + containingJar.getName());
		}
		File extractedFile = new File(dstDir, new File(zipFileEntry.getName())
				.getName());
		try {
			pipeStream(containingJar.getInputStream(zipFileEntry),
					new FileOutputStream(extractedFile));
		} catch (FileNotFoundException e) {
			throw new DeploymentException("file " + fileName + " not found in "
					+ containingJar.getName(), e);
		} catch (IOException e) {
			throw new DeploymentException("erro extracting file " + fileName
					+ " from " + containingJar.getName(), e);
		}
		logger.debug("Extracted file " + extractedFile.getName());
		return extractedFile;
	}
private File extractFile ( String fileName , JarFile containingJar , File dstDir ) throws DeploymentException { ZipEntry zipFileEntry = containingJar . getEntry ( fileName ) ; logger . trace ( "Extracting file " + fileName + " from " + containingJar . getName ( ) ) ; if ( zipFileEntry == null ) { throw new DeploymentException ( "Error extracting jar file  " + fileName + " from " + containingJar . getName ( ) ) ; } File extractedFile = new File ( dstDir , new File ( zipFileEntry . getName ( ) ) . getName ( ) ) ; try { pipeStream ( containingJar . getInputStream ( zipFileEntry ) , new FileOutputStream ( extractedFile ) ) ; } catch ( FileNotFoundException e ) { throw new DeploymentException ( "file " + fileName + " not found in " + containingJar . getName ( ) , e ) ; } catch ( IOException e ) { throw new DeploymentException ( "erro extracting file " + fileName + " from " + containingJar . getName ( ) , e ) ; } logger . debug ( "Extracted file " + extractedFile . getName ( ) ) ; return extractedFile ; }
Extracts the file with name <code>fileName</code> out of the
<code>containingJar</code> archive and stores it in <code>dstDir</code>.

@param fileName
the name of the file to extract.
@param containingJar
the archive where to extract it from.
@param dstDir
the location where the extracted file should be stored.
@return a <code>java.io.File</code> reference to the extracted file.
@throws DeploymentException