public class HtmlWhiteSpaceStripper extends Object implements Appendable
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
Appendable |
append(char c) |
Appendable |
append(CharSequence csq) |
Appendable |
append(CharSequence csq,
int start,
int end) |
String |
toString() |
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.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
Copyright © 2010–2013 Google. All rights reserved.