|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xml.security.utils.JavaUtils
public class JavaUtils
A collection of different, general-purpose methods for JAVA-specific things
| Method Summary | |
|---|---|
static void |
checkRegisterPermission()
Throws a SecurityException if a security manager is installed
and the caller is not allowed to register an implementation of an
algorithm, transform, or other security sensitive XML Signature function. |
static byte[] |
convertDsaASN1toXMLDSIG(byte[] asn1Bytes,
int size)
Converts an ASN.1 DSA value to a XML Signature DSA Value. |
static byte[] |
convertDsaXMLDSIGtoASN1(byte[] xmldsigBytes,
int size)
Converts an XML Signature DSA Value to a ASN.1 DSA value. |
static byte[] |
getBytesFromFile(String fileName)
Method getBytesFromFile |
static byte[] |
getBytesFromStream(InputStream inputStream)
This method reads all bytes from the given InputStream till EOF and returns them as a byte array. |
static void |
writeBytesToFilename(String filename,
byte[] bytes)
Method writeBytesToFilename |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] getBytesFromFile(String fileName)
throws FileNotFoundException,
IOException
fileName -
FileNotFoundException
IOException
public static void writeBytesToFilename(String filename,
byte[] bytes)
filename - bytes -
public static byte[] getBytesFromStream(InputStream inputStream)
throws IOException
inputStream -
FileNotFoundException
IOException
public static byte[] convertDsaASN1toXMLDSIG(byte[] asn1Bytes,
int size)
throws IOException
asn1Bytes - the ASN.1 encoded bytessize - size of r and s in bytes
IOException - if the bytes are not encoded correctly
public static byte[] convertDsaXMLDSIGtoASN1(byte[] xmldsigBytes,
int size)
throws IOException
xmldsigBytes - the XML Signature encoded bytessize - size of r and s in bytes
IOException - if the bytes are not encoded correctlypublic static void checkRegisterPermission()
SecurityException if a security manager is installed
and the caller is not allowed to register an implementation of an
algorithm, transform, or other security sensitive XML Signature function.
SecurityException - if a security manager is installed and the
caller has not been granted the
"org.apache.xml.security.register"
SecurityPermission
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||