LineBreakingTagStripperpublic class LineBreakingTagStripper extends HTMLEditorKit$ParserCallback
Fields Summary |
---|
private Writer | out | private String | lineSeparator |
Constructors Summary |
---|
public LineBreakingTagStripper(Writer out)
this(out, System.getProperty("line.separator", "\r\n"));
| public LineBreakingTagStripper(Writer out, String lineSeparator)
this.out = out;
this.lineSeparator = lineSeparator;
|
Methods Summary |
---|
public void | handleEndTag(javax.swing.text.html.HTML$Tag tag, int position)
try {
if (tag.isBlock()) {
out.write(lineSeparator);
out.write(lineSeparator);
}
else if (tag.breaksFlow()) {
out.write(lineSeparator);
}
}
catch (IOException ex) {
System.err.println(ex);
}
| public void | handleSimpleTag(javax.swing.text.html.HTML$Tag tag, javax.swing.text.MutableAttributeSet attributes, int position)
try {
if (tag.isBlock()) {
out.write(lineSeparator);
out.write(lineSeparator);
}
else if (tag.breaksFlow()) {
out.write(lineSeparator);
}
else {
out.write(' ");
}
}
catch (IOException ex) {
System.err.println(ex);
}
| public void | handleText(char[] text, int position)
try {
out.write(text);
out.flush();
}
catch (IOException ex) {
System.err.println(ex);
}
|
|