Exemplo n.º 1
0
  private void executeMinify() {

    Minifier minifier = findMinifier();

    InputStream inStream = null;
    OutputStream outStream = null;
    try {
      inStream = this.fileIn != null ? Streams.fileInputStream(this.fileIn) : null;
      outStream = this.fileOut != null ? Streams.fileOutputStream(this.fileOut) : null;

      minifier.minify(inStream, outStream, this.commentCharset, this.comment);
    } finally {
      Streams.close(inStream);
      Streams.close(outStream);
    }
  }
Exemplo n.º 2
0
 private Minifier minifierForFile(File file) {
   checkNotNull(file);
   return Minifier.forFileName(file.getName());
 }
Exemplo n.º 3
0
 private Minifier minifierForFormat(Format format) {
   return Minifier.forFileName("file." + format.name().toLowerCase());
 }