axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils XMLUtils.java
Date Thu, 05 Apr 2001 00:31:44 GMT
dug         01/04/04 17:31:44

  Modified:    java/src/org/apache/axis/utils XMLUtils.java
  Log:
  Changing use of XMLSerializer from ByteArrayOutputStream to
  StringWriter.  ByteArrayOutputStream.toString() doesn't handle
  international chars very well (thanks to Michael Brennan
  (Michael_Brennan@Allegia.com) for noticing).  Hopefully StringWriter is ok.
  
  Revision  Changes    Path
  1.2       +4 -4      xml-axis/java/src/org/apache/axis/utils/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/XMLUtils.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLUtils.java	2001/03/31 22:24:08	1.1
  +++ XMLUtils.java	2001/04/05 00:31:43	1.2
  @@ -115,11 +115,11 @@
   
     public static String DocumentToString(Document doc) {
       try {
  -      ByteArrayOutputStream  baos = new ByteArrayOutputStream();
  -      XMLSerializer  xs = new XMLSerializer( baos, new OutputFormat() );
  +      StringWriter sw = new StringWriter();
  +      XMLSerializer  xs = new XMLSerializer( sw, new OutputFormat() );
         xs.serialize( (Document) doc );
  -      baos.close();
  -      return( baos.toString() );
  +      sw.close();
  +      return(sw.toString() );
       }
       catch( Exception e ) {
         e.printStackTrace();
  
  
  

Mime
View raw message