On Fri, 2005-04-15 at 20:16 +0000, [EMAIL PROTECTED] wrote: > jochen 2005/04/15 13:16:19 > > Modified: src/java/org/apache/xmlrpc XmlRpc.java > Log: > Fixed URL typos.
Jochen, this change log message has nothing to do with this commit. Has the change log been corrected yet? I like the addition of the static defaults, and instance particulars for encoding. > Revision Changes Path > 1.39 +35 -9 ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java > > Index: XmlRpc.java > =================================================================== > RCS file: /home/cvs/ws-xmlrpc/src/java/org/apache/xmlrpc/XmlRpc.java,v > retrieving revision 1.38 > retrieving revision 1.39 > diff -u -r1.38 -r1.39 > --- XmlRpc.java 30 Mar 2005 11:19:18 -0000 1.38 > +++ XmlRpc.java 15 Apr 2005 20:16:19 -0000 1.39 > @@ -196,9 +196,10 @@ > * is not compatible with ASCII (eg. EBCDIC) but the network is > * still ASCII-like. > */ > - static String inputEncoding = null; > + static String defaultInputEncoding = null; > > private TypeFactory typeFactory; > + private String inputEncoding; The indentation is off here for inputEncoding. > /** > * Creates a new instance with the [EMAIL PROTECTED] > @@ -227,6 +228,7 @@ > } > } > this.typeFactory = createTypeFactory(typeFactoryName); > + this.inputEncoding = defaultInputEncoding; Another indentation problem. > } > > /** > @@ -351,24 +353,48 @@ > return XmlWriter.canonicalizeEncoding(encoding); > } > > - /** > - * Set the input encoding of the XML. > + /** Set the default input encoding of the XML. > * This is used only if set. > * > * @param enc The Java name of the encoding. > + * @see #setInputEncoding(String) > */ > - public static void setInputEncoding(String enc) > + public static void setDefaultInputEncoding(String enc) > { > - inputEncoding = enc; > + defaultInputEncoding = enc; > } > > /** > - * Return the input encoding. This may be null. This is always a > - * Java encoding name, it is not transformed. > + * Return the default input encoding. This may be null. > + * This is always a Java encoding name, it is not transformed. > * > * @return the Java encoding name to use, if set, otherwise null. > + * @see #getInputEncoding() > + */ > + public static String getDefaultInputEncoding () ^ Extra space here not consistent with formatting style used in this source file. > + { > + return defaultInputEncoding; > + } > + > + /** > + * Set the input encoding for this XmlRpc instance. This can be > + * used when the XMLRPC response does not contain the proper > + * encoding information in the XML declaration. > + * > + * @param enc The Java name of the encoding. > + */ > + public void setInputEncoding(String enc) > + { > + inputEncoding = enc; > + } > + > + /** > + * Get the input encoding for this XmlRpc instance. This is a Java > + * encoding name. > + * > + * @return The Java encoding name to use. <code>null</code> if not > set. > */ > - public static String getInputEncoding () > + public String getInputEncoding() > { > return inputEncoding; > } >