|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.weborganic.bastille.util.JSMin
public final class JSMin
A JavaScript minimiser.
This class is a slightly modified version of the work done by John Reilly who initially adapted Douglas Crockford's C version of his JavaScript minimiser.
| Nested Class Summary | |
|---|---|
static class |
JSMin.UnterminatedCommentException
A comment that does not terminate properly. |
static class |
JSMin.UnterminatedRegExpLiteralException
A regular expression that does not terminate properly. |
static class |
JSMin.UnterminatedStringLiteralException
A string that does not terminate properly. |
| Constructor Summary | |
|---|---|
JSMin(InputStream in,
OutputStream out)
Creates a new JavaScript minimiser for the specified I/O. |
|
| Method Summary | |
|---|---|
void |
jsmin()
Main JSMin method. |
static void |
main(String[] arg)
To invoke the minimizer on the command line. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSMin(InputStream in,
OutputStream out)
in - The JavaScript to minimise.out - The minimised script.| Method Detail |
|---|
public void jsmin()
throws IOException,
ParsingException
Copy the input to the output, deleting the characters which are insignificant to JavaScript:
IOException - If an error occurs while reading the input or writing on the output.
ParsingException - If an error occurs while parsing the JavaScript (minimizing is not possible then).public static void main(String[] arg)
arg - name of file to minimize
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||