xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r670395 - /xml/commons/trunk/java/external/src/javax/xml/transform/stax/StAXResult.java
Date Sun, 22 Jun 2008 18:50:55 GMT
Author: mrglavas
Date: Sun Jun 22 11:50:54 2008
New Revision: 670395

URL: http://svn.apache.org/viewvc?rev=670395&view=rev
Log:
Completing the implementation of StAXResult.

Modified:
    xml/commons/trunk/java/external/src/javax/xml/transform/stax/StAXResult.java

Modified: xml/commons/trunk/java/external/src/javax/xml/transform/stax/StAXResult.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/transform/stax/StAXResult.java?rev=670395&r1=670394&r2=670395&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/transform/stax/StAXResult.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/transform/stax/StAXResult.java Sun Jun 22
11:50:54 2008
@@ -19,16 +19,46 @@
 
 package javax.xml.transform.stax;
 
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Result;
 
 public class StAXResult implements Result {
+    
+    public static final String FEATURE = "http://javax.xml.transform.stax.StAXResult/feature";
+    
+    private final XMLStreamWriter xmlStreamWriter;
+    private final XMLEventWriter xmlEventWriter;
+    
+    public StAXResult(XMLStreamWriter xmlStreamWriter) {
+        if (xmlStreamWriter == null) {
+            throw new IllegalArgumentException("XMLStreamWriter cannot be null.");
+        }
+        this.xmlStreamWriter = xmlStreamWriter;
+        this.xmlEventWriter = null;
+    }
+    
+    public StAXResult(XMLEventWriter xmlEventWriter) {
+        if (xmlEventWriter == null) {
+            throw new IllegalArgumentException("XMLEventWriter cannot be null.");
+        }
+        this.xmlStreamWriter = null;
+        this.xmlEventWriter = xmlEventWriter;
+    }
+    
+    public XMLStreamWriter getXMLStreamWriter() {
+        return xmlStreamWriter;
+    }
+    
+    public XMLEventWriter getXMLEventWriter() {
+        return xmlEventWriter;
+    }
 
     public String getSystemId() {
-        // TODO Auto-generated method stub
         return null;
     }
 
     public void setSystemId(String systemId) {
-        // TODO Auto-generated method stub
+        throw new UnsupportedOperationException("Setting systemId is not supported.");
     }
 }



Mime
View raw message