Revision: 4495
          http://vexi.svn.sourceforge.net/vexi/?rev=4495&view=rev
Author:   mkpg2
Date:     2013-03-20 12:14:44 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Minor Change. Make it possible to initialise XML directly with a Reader (and 
not an InputStream).

Modified Paths:
--------------
    trunk/org.vexi-library.util/src/main/java/org/ibex/util/XML.java

Modified: trunk/org.vexi-library.util/src/main/java/org/ibex/util/XML.java
===================================================================
--- trunk/org.vexi-library.util/src/main/java/org/ibex/util/XML.java    
2013-03-18 02:47:49 UTC (rev 4494)
+++ trunk/org.vexi-library.util/src/main/java/org/ibex/util/XML.java    
2013-03-20 12:14:44 UTC (rev 4495)
@@ -111,16 +111,20 @@
         this.poolElements = poolElements;;
     }
    
-    
     public void setInput(InputStream in, String defaultEncoding) throws 
IOException{
+       // parse prolog, which will determine the char set if present
+        String encoding = p_parse(in, defaultEncoding);
+        setInput(new InputStreamReader(in, encoding));
+    }
+    public void setInput(Reader in){
        // reset
         off = len = 0;
         line = col = 1;
         current = null;
-        // parse prolog, which will determine the char set if present
-        String encoding = p_parse(in, defaultEncoding);
-        this.in = new InputStreamReader(in, encoding);
+        this.in = in;
     }
+    
+    
 
     /** Returns the line number at the beginning of the last process call. */
     public int getLine() { return line; }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to