abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1409331 - in /abdera/java/trunk: parser/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java security/src/main/java/org/apache/abdera/security/util/DHContext.java
Date Wed, 14 Nov 2012 19:58:53 GMT
Author: veithen
Date: Wed Nov 14 19:58:52 2012
New Revision: 1409331

URL: http://svn.apache.org/viewvc?rev=1409331&view=rev
Log:
Adapt to latest changes in Axiom.

Modified:
    abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
    abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java?rev=1409331&r1=1409330&r2=1409331&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
Wed Nov 14 19:58:52 2012
@@ -17,6 +17,9 @@
  */
 package org.apache.abdera.parser.stax;
 
+import java.io.IOException;
+import java.io.InputStream;
+
 import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
 
@@ -81,6 +84,14 @@ public class FOMTextValue extends OMText
         return (DataHandler)super.getDataHandler();
     }
 
+    public InputStream getInputStream() {
+        try {
+            return getDataHandler().getInputStream();
+        } catch (IOException ex) {
+            throw new FOMException(ex);
+        }
+    }
+
     public <T extends Base> T getParentElement() {
         T parent = (T)super.getParent();
         return (T)((parent instanceof Element) ? getWrapped((Element)parent) : parent);

Modified: abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java?rev=1409331&r1=1409330&r2=1409331&view=diff
==============================================================================
--- abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
(original)
+++ abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/DHContext.java
Wed Nov 14 19:58:52 2012
@@ -37,7 +37,7 @@ import javax.crypto.spec.DHParameterSpec
 
 import org.apache.abdera.security.Encryption;
 import org.apache.abdera.security.EncryptionOptions;
-import org.apache.axiom.om.util.Base64;
+import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.xml.security.encryption.XMLCipher;
 
 /**
@@ -85,7 +85,7 @@ public class DHContext implements Clonea
         buf.append(g.toString());
         buf.append(", ");
         buf.append("k=");
-        buf.append(Base64.encode(keyPair.getPublic().getEncoded()));
+        buf.append(Base64Utils.encode(keyPair.getPublic().getEncoded()));
         return buf.toString();
     }
 
@@ -93,7 +93,7 @@ public class DHContext implements Clonea
         StringBuilder buf = new StringBuilder();
         buf.append("DH ");
         buf.append("k=");
-        buf.append(Base64.encode(keyPair.getPublic().getEncoded()));
+        buf.append(Base64Utils.encode(keyPair.getPublic().getEncoded()));
         return buf.toString();
     }
 
@@ -126,7 +126,7 @@ public class DHContext implements Clonea
             else if (name.equalsIgnoreCase("g"))
                 g = new BigInteger(value);
             else if (name.equalsIgnoreCase("k"))
-                key = Base64.decode(value);
+                key = Base64Utils.decode(value);
         }
         init(p, g, l, key);
     }
@@ -164,7 +164,7 @@ public class DHContext implements Clonea
             String name = token.substring(0, token.indexOf("="));
             String value = token.substring(token.indexOf("=") + 1);
             if (name.equalsIgnoreCase("k"))
-                key = Base64.decode(value);
+                key = Base64Utils.decode(value);
         }
         publicKey = decode(key);
         return this;



Mime
View raw message