code: @Override
  	public OutputStream getResourceAsOutputStream(String resourceName) throws IOException {
  
  		// Create directories if needed
  		String generatedFilePath = resourceName.substring(workingDir.length());
  		if (!FileNameUtils.isExtension(generatedFilePath, JawrConstant.CSS_TYPE)
  				&& binaryGeneratorRegistry.isGeneratedBinaryResource(generatedFilePath)) {
  			// for generated image put it in the generated Image directory
  			generatedFilePath = workingDir + JawrConstant.SPRITE_GENERATED_IMG_DIR
  					+ generatedFilePath.replace(':', '/');
  		} else if (cssGeneratorRegistry.isPathGenerated(generatedFilePath)) { // Rename
  																				// resource
  																				// for
  																				// For
  																				// generated
  																				// CSS
  			generatedFilePath = workingDir + JawrConstant.SPRITE_GENERATED_CSS_DIR
  					+ generatedFilePath.replace(':', '/');
  		} else {
  			generatedFilePath = resourceName;
  		}
  
  		final File parentFile = new File(generatedFilePath).getParentFile();
  		if (!parentFile.exists()) {
  			if (!parentFile.mkdirs()) {
  				throw new IOException("Unable to create the directory : " + parentFile.getPath());
  			}
  		}
  
  		File file = new File(generatedFilePath);
  		try {
  			file = file.getCanonicalFile();
  		} catch (final IOException e) {
  			file = file.getAbsoluteFile();
  		}
  
  		return new FileOutputStream(file);
  	}
docs: /*
  (non-Javadoc)
  
  @see org.carrot2.labs.smartsprites.resource.ResourceHandler#
  getResourceAsOutputStream(java.lang.String)