wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/impl/css/JawrCssMinifierProcessor.java
public void process(final Resource resource, final Reader reader, final Writer writer)
    throws IOException {
    try {
      final String content = IOUtils.toString(reader);
      final StringBuffer result = new JawrCssMinifier().minifyCSS(new StringBuffer(content));
      writer.write(result.toString());
      writer.flush();
    } catch (final Exception e) {
      final String resourceUri = resource == null ? StringUtils.EMPTY : "[" + resource.getUri() + "]";
      String message = "Exception while applying " + getClass().getSimpleName() + " processor on the "
          + resourceUri + " resource";
      LOG.error(message, e);
      throw new IOException(message);
    } finally {
      reader.close();
      writer.close();
    }
  }
public void process(final Resource resource, final Reader reader, final Writer writer)
    throws IOException {
    try {
      final String content = IOUtils.toString(reader);
      final StringBuffer result = new JawrCssMinifier().minifyCSS(new StringBuffer(content));
      writer.write(result.toString());
      writer.flush();
    } catch (final Exception e) {
      final String resourceUri = resource == null ? StringUtils.EMPTY : "[" + resource.getUri() + "]";
      String message = "Exception while applying " + getClass().getSimpleName() + " processor on the "
          + resourceUri + " resource";
      LOG.error(message, e);
      throw new IOException(message);
    } finally {
      reader.close();
      writer.close();
    }
  }
public void process ( final Resource resource , final Reader reader , final Writer writer ) throws IOException { try { final String content = IOUtils . toString ( reader ) ; final StringBuffer result = new JawrCssMinifier ( ) . minifyCSS ( new StringBuffer ( content ) ) ; writer . write ( result . toString ( ) ) ; writer . flush ( ) ; } catch ( final Exception e ) { final String resourceUri = resource == null ? StringUtils . EMPTY : "[" + resource . getUri ( ) + "]" ; String message = "Exception while applying " + getClass ( ) . getSimpleName ( ) + " processor on the " + resourceUri + " resource" ; LOG . error ( message , e ) ; throw new IOException ( message ) ; } finally { reader . close ( ) ; writer . close ( ) ; } }
{@inheritDoc}
{