code: @Override
  	public void writeBundleTo(String bundlePath, Writer writer) throws ResourceNotFoundException {
  		
  		String text = (String) cacheMgr.get(TEXT_CACHE_PREFIX + bundlePath);
  		try {
  			// If it's not cached yet
  			if (null == text) {
  				String charsetName = rsHandler.getConfig().getResourceCharset().name();
  				ByteArrayOutputStream baOs = new ByteArrayOutputStream();
  				WritableByteChannel wrChannel = Channels.newChannel(baOs);
  				Writer tempWriter = Channels.newWriter(wrChannel, charsetName);
  				rsHandler.writeBundleTo(bundlePath, tempWriter);
  				text = baOs.toString(charsetName);
  				cacheMgr.put(TEXT_CACHE_PREFIX + bundlePath, text);
  			}
  
  			// Write the text to the outputstream
  			writer.write(text);
  			writer.flush();
  
  		} catch (IOException e) {
  			throw new BundlingProcessException("Unexpected IOException writing bundle[" + bundlePath + "]", e);
  		}finally {
  			IOUtils.close(writer);
  		}
  	}
docs: /*
  (non-Javadoc)
  
  @see
  net.jawr.web.resource.bundle.ResourceBundlesHandler#writeBundleTo(java
  .lang.String, java.io.Writer)