public final class CSSMin extends Object
It removes unnecessary whitespace and comments, and orders the contents of CSS selectors alphabetically to enhance GZIP compression.
Originally by Barry van Oudtshoorn and released under BSD licence, with bug reports, fixes, and contributions by
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Main entry point for CSSMin from the command-line.
|
static void |
minimize(Reader input,
OutputStream out)
Process input from a reader.
|
static void |
minimize(Reader input,
PrintWriter min)
Minify CSS from a reader to a printstream.
|
static void |
minimize(String filename,
OutputStream out)
Process a file from a filename.
|
public static void minimize(String filename, OutputStream out)
filename
- The file name of the CSS file to process.out
- Where to send the resultpublic static void minimize(Reader input, OutputStream out)
input
- Where to read the CSS fromout
- Where to send the resultpublic static void minimize(Reader input, PrintWriter min)
input
- Where to read the CSS frommin
- Where to write the result topublic static void main(String[] args)
args
- The command-line argumentsCopyright © 2016 Allette Systems. All rights reserved.