dlr 02/03/07 20:41:53
Modified: src/java/org/apache/xmlrpc/applet SimpleXmlRpcClient.java
Log:
o Patch by Martin Poeschl <[EMAIL PROTECTED]> to make byte[] write
more efficient in XmlWriter.
o Noted that XmlWriter in this class should be replace by the one from
the XmlRpc core.
Revision Changes Path
1.3 +10 -2
xml-rpc/src/java/org/apache/xmlrpc/applet/SimpleXmlRpcClient.java
Index: SimpleXmlRpcClient.java
===================================================================
RCS file:
/home/cvs/xml-rpc/src/java/org/apache/xmlrpc/applet/SimpleXmlRpcClient.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- SimpleXmlRpcClient.java 7 Mar 2002 21:33:27 -0000 1.2
+++ SimpleXmlRpcClient.java 8 Mar 2002 04:41:53 -0000 1.3
@@ -189,7 +189,7 @@
} else if (what instanceof byte[]) {
writer.startElement ("base64");
// FIXME: Find a better way than creating a new String and converting to a
char[]
- writer.write (new String(Base64.encode((byte[])what)).toCharArray());
+ writer.write (Base64.encode((byte[])what));
writer.endElement ("base64");
} else if (what instanceof Vector) {
writer.startElement ("array");
@@ -570,7 +570,10 @@
}
- // A quick and dirty XML writer.
+ /**
+ * A quick and dirty XML writer.
+ * TODO: Replace with core package's XmlWriter class.
+ */
class XmlWriter
{
@@ -626,6 +629,11 @@
buf.append (c);
}
}
+ }
+
+ public void write (byte[] text)
+ {
+ buf.append (text);
}
public void write (char[] text)