abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r555880 - in /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util: AbderaResult.java AbderaSource.java
Date Fri, 13 Jul 2007 05:42:42 GMT
Author: jmsnell
Date: Thu Jul 12 22:42:42 2007
New Revision: 555880

URL: http://svn.apache.org/viewvc?view=rev&rev=555880
Log:
A few basic implementation improvements

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaSource.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java?view=diff&rev=555880&r1=555879&r2=555880
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaResult.java
Thu Jul 12 22:42:42 2007
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PipedInputStream;
 import java.io.PipedOutputStream;
 import java.io.Writer;
@@ -37,17 +38,17 @@
  * 
  * Only use this once per transform!!!
  */
-public class AbderaResult 
+public final class AbderaResult 
   extends StreamResult 
   implements Result {
 
-  private Abdera abdera = null;
+  private final Abdera abdera;
   private PipedOutputStream pipeout = null;
   private PipedInputStream pipein = null;
   private Document doc = null;
   
   public AbderaResult() {
-    this.abdera = new Abdera();
+    this(new Abdera());
   }
   
   public AbderaResult(Abdera abdera) {
@@ -76,7 +77,7 @@
 
   @Override
   public Writer getWriter() {
-    return null;
+    return new OutputStreamWriter(getOutputStream());
   }
 
   @Override

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaSource.java?view=diff&rev=555880&r1=555879&r2=555880
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaSource.java
(original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/AbderaSource.java
Thu Jul 12 22:42:42 2007
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.PipedInputStream;
 import java.io.PipedOutputStream;
 import java.io.Reader;
@@ -33,11 +34,11 @@
  * javax.xml.transform.Source that allows Abdera objects to be used with
  * the javax.xml.transform API's
  */
-public class AbderaSource 
+public final class AbderaSource 
   extends StreamSource 
   implements Source {
 
-  private Base base = null;
+  private final Base base;
   
   public AbderaSource(Base base) {
     this.base = base;
@@ -59,7 +60,7 @@
 
   @Override
   public Reader getReader() {
-    return null;
+    return new InputStreamReader(getInputStream());
   }
 
   @Override



Mime
View raw message