bodewig 2003/04/29 07:16:45
Modified: src/main/org/apache/tools/ant/util DOMElementWriter.java
Log:
Minor doc changes and optimizations
Revision Changes Path
1.19 +5 -3
ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java
Index: DOMElementWriter.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- DOMElementWriter.java 4 Apr 2003 13:51:12 -0000 1.18
+++ DOMElementWriter.java 29 Apr 2003 14:16:45 -0000 1.19
@@ -75,7 +75,7 @@
*
* @author The original author of XmlLogger
* @author Stefan Bodewig
- * @author <a href="mailto:[EMAIL PROTECTED]">Stephane Bailliez</tt>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Stephane Bailliez</a>
*/
public class DOMElementWriter {
@@ -90,7 +90,7 @@
/**
* Writes a DOM tree to a stream in UTF8 encoding. Note that
- * it appends the <?xml version='1.0' encoding='UTF-8'?>.
+ * it prepends the <?xml version='1.0' encoding='UTF-8'?>.
* The indent number is set to 0 and a 2-space indent.
* @param root the root element of the DOM tree.
* @param out the outputstream to write to.
@@ -105,6 +105,7 @@
/**
* Writes a DOM tree to a stream.
+ *
* @param element the Root DOM element of the tree
* @param out where to send the output
* @param indent number of
@@ -254,7 +255,8 @@
*/
public String encodedata(final String value) {
StringBuffer sb = new StringBuffer();
- for (int i = 0; i < value.length(); ++i) {
+ int len = value.length();
+ for (int i = 0; i < len; ++i) {
char c = value.charAt(i);
if (isLegalCharacter(c)) {
sb.append(c);