XML Security, 1.6

com.ibm.xml.enc.dom
Class Utils

java.lang.Object
  extended by com.ibm.xml.enc.dom.Utils

public final class Utils
extends java.lang.Object

Miscellaneous static utility methods for use in JSR 105 RI.


Method Summary
static byte[] base64Decode(java.lang.String text)
           
static java.lang.String base64Encode(byte[] bytes)
           
static java.lang.String base64EncodeNoWhite(byte[] bytes)
           
static void checkKeySize(java.lang.Integer keysizeInt, java.security.interfaces.RSAKey key)
           
static boolean compareArray(byte[] a, byte[] b)
           
static java.lang.String mapAlgorithm(java.lang.String uri)
           
static java.lang.String parseIdFromSameDocumentURI(java.lang.String uri)
          Returns the ID from a same-document URI (ex: "#id")
static byte[] readBytesFromStream(java.io.InputStream is)
           
static boolean sameDocumentURI(java.lang.String uri)
          Returns true if uri is a same-document URI, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

base64Decode

public static byte[] base64Decode(java.lang.String text)
                           throws java.io.IOException
Throws:
java.io.IOException

base64Encode

public static java.lang.String base64Encode(byte[] bytes)

base64EncodeNoWhite

public static java.lang.String base64EncodeNoWhite(byte[] bytes)

readBytesFromStream

public static byte[] readBytesFromStream(java.io.InputStream is)
                                  throws java.io.IOException
Throws:
java.io.IOException

parseIdFromSameDocumentURI

public static java.lang.String parseIdFromSameDocumentURI(java.lang.String uri)
Returns the ID from a same-document URI (ex: "#id")


sameDocumentURI

public static boolean sameDocumentURI(java.lang.String uri)
Returns true if uri is a same-document URI, false otherwise.


compareArray

public static boolean compareArray(byte[] a,
                                   byte[] b)

mapAlgorithm

public static java.lang.String mapAlgorithm(java.lang.String uri)

checkKeySize

public static void checkKeySize(java.lang.Integer keysizeInt,
                                java.security.interfaces.RSAKey key)
                         throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

XML Security, 1.6

Portions Copyright 2003, 2012 IBM Corporation.
Portions Copyright 2003, 2012 Oracle and/or its affiliates.