|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.clearsilver.jsilver.template.HtmlWhiteSpaceStripper
public class HtmlWhiteSpaceStripper
HTML whitespace stripper to be used by JSilver. It removes leading and trailing whitespace, it reduces contiguous whitespace characters with just the first character, and removes lines of nothing but whitespace. It does not strip whitespace inside the following elements:
Loadtests indicate that this class can strip whitespace almost as quickly as just reading every character from a string (20% slower).
While not strictly compatible with the JNI Clearsilver whitestripping function, we are not aware of any differences that yield functionally different HTML output. However, we encourage users to verify for themselves and report any differences.
Constructor Summary | |
---|---|
HtmlWhiteSpaceStripper(Appendable out)
Intermediate Appendable object that strips whitespace as it passes through characters to another Appendable object. |
|
HtmlWhiteSpaceStripper(Appendable out,
int level)
Intermediate Appendable object that strips whitespace as it passes through characters to another Appendable object. |
Method Summary | |
---|---|
Appendable |
append(char c)
|
Appendable |
append(CharSequence csq)
|
Appendable |
append(CharSequence csq,
int start,
int end)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HtmlWhiteSpaceStripper(Appendable out)
out
- The Appendable object to dump the stripped output to.public HtmlWhiteSpaceStripper(Appendable out, int level)
out
- The Appendable object to dump the stripped output to.level
- Ignored for now.Method Detail |
---|
public String toString()
toString
in class Object
public Appendable append(CharSequence csq) throws IOException
append
in interface Appendable
IOException
public Appendable append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
IOException
public Appendable append(char c) throws IOException
append
in interface Appendable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |