File inputFile = new File(inputFilename);
File outputFile = new File(outputFilename);
in = new InputStreamReader(new FileInputStream(inputFile), minifyProperty.getCharset());
minifyFileResult.setInputFileSize(inputFile.length());
HtmlCompressor compressor = new HtmlCompressor();
compressor.setRemoveIntertagSpaces(true);
compressor.setCompressCss(minifyProperty.isBuildInternalCSSMinify()); //compress inline css
compressor.setCompressJavaScript(minifyProperty.isBuildInternalJSMinify()); //compress inline javascript
compressor.setYuiJsNoMunge(!minifyProperty.isJsObfuscate());
// compressor.setRemoveQuotes(true); //false may in feature //removes unnecessary tag attribute quotes
//compressor.setSimpleDoctype(true); //false may in feature //simplify existing doctype
//compressor.setRemoveComments(true); //false may in feature //if false keeps HTML comments (default is true)
//compressor.setSimpleBooleanAttributes(true); //false may in feature //remove values from boolean tag attributes
//compressor.setPreserveLineBreaks(true); //preserves original line breaks
String output = compressor.compress(fromStream(in));//out, minifyProperty.getLineBreakPosition());
in.close();
in = null;
out = new OutputStreamWriter(new FileOutputStream(outputFile), minifyProperty.getCharset());