|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javawebparts.filter.JSMin
This class is used to do compression.
| Nested Class Summary | |
(package private) class |
JSMin.UnterminatedCommentException
This class is thrown when a Comment is not terminated correctly. |
(package private) class |
JSMin.UnterminatedRegExpLiteralException
This class is thrown when a RegExp is not terminated correctly. |
(package private) class |
JSMin.UnterminatedStringLiteralException
This class is thrown when a String is not terminated correctly. |
| Field Summary | |
private static int |
EOF
|
private java.io.PushbackInputStream |
in
|
private java.lang.StringBuffer |
out
|
private int |
theA
|
private int |
theB
|
| Constructor Summary | |
JSMin()
Constructor |
|
| Method Summary | |
(package private) void |
action(int d)
action -- do something. |
java.lang.String |
compress(java.lang.String text)
compress -- Copy the input to the output, deleting the characters which are insignificant to JavaScript. |
(package private) int |
get()
get -- return the next character from stdin. |
(package private) static boolean |
isAlphanum(int c)
isAlphanum -- return true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character. |
(package private) int |
next()
This method gets the next character, excluding comments. |
(package private) int |
peek()
Get the next character without getting it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int EOF
private java.io.PushbackInputStream in
private java.lang.StringBuffer out
private int theA
private int theB
| Constructor Detail |
public JSMin()
| Method Detail |
static boolean isAlphanum(int c)
c - the character from the input as an int.
int get() throws java.io.IOException
java.io.IOException - IOException.int peek() throws java.io.IOException
java.io.IOException - IOException.
int next()
throws JSMin.UnterminatedCommentException,
java.io.IOException
JSMin.UnterminatedCommentException - UnterminatedCommentException.
java.io.IOException - IOException.
void action(int d)
throws java.io.IOException,
JSMin.UnterminatedRegExpLiteralException,
JSMin.UnterminatedCommentException,
JSMin.UnterminatedStringLiteralException
d - Type of action (see above).
java.io.IOException - IOException.
JSMin.UnterminatedRegExpLiteralException - UnterminatedRegExpLiteralException.
JSMin.UnterminatedCommentException - UnterminatedCommentException.
JSMin.UnterminatedStringLiteralException - UnterminatedStringLiteralException.
public java.lang.String compress(java.lang.String text)
throws java.io.IOException,
JSMin.UnterminatedRegExpLiteralException,
JSMin.UnterminatedCommentException,
JSMin.UnterminatedStringLiteralException
text - The text to compress.
java.io.IOException - IOException.
JSMin.UnterminatedRegExpLiteralException - UnterminatedRegExpLiteralException.
JSMin.UnterminatedCommentException - UnterminatedCommentException.
JSMin.UnterminatedStringLiteralException - UnterminatedStringLiteralException.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||