[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    svn commit: r730460 -
From:       mrglavas () apache ! org
Date:       2008-12-31 19:59:38
Message-ID: 20081231195938.3AA0C2388876 () eris ! apache ! org
[Download RAW message or body]

Author: mrglavas
Date: Wed Dec 31 11:59:37 2008
New Revision: 730460

URL: http://svn.apache.org/viewvc?rev=730460&view=rev
Log:
Adding a toString() method for debugging purposes. Just calls \
writeAsEncodedUnicode().

Modified:
    xerces/java/branches/stax-dev/src/org/apache/xerces/stax/events/XMLEventImpl.java

Modified: xerces/java/branches/stax-dev/src/org/apache/xerces/stax/events/XMLEventImpl.java
                
URL: http://svn.apache.org/viewvc/xerces/java/branches/stax-dev/src/org/apache/xerces/stax/events/XMLEventImpl.java?rev=730460&r1=730459&r2=730460&view=diff
 ==============================================================================
--- xerces/java/branches/stax-dev/src/org/apache/xerces/stax/events/XMLEventImpl.java \
                (original)
+++ xerces/java/branches/stax-dev/src/org/apache/xerces/stax/events/XMLEventImpl.java \
Wed Dec 31 11:59:37 2008 @@ -17,6 +17,7 @@
 
 package org.apache.xerces.stax.events;
 
+import java.io.StringWriter;
 import java.io.Writer;
 
 import javax.xml.namespace.QName;
@@ -176,4 +177,13 @@
     public void writeAsEncodedUnicode(final Writer writer) throws XMLStreamException \
{  // TODO Auto-generated method stub
     }
+    
+    public final String toString() {
+        final StringWriter writer = new StringWriter();
+        try {
+            writeAsEncodedUnicode(writer);
+        }
+        catch (XMLStreamException xse) {}
+        return writer.toString();
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic