Package org.apache.xml.security.utils
Class JavaUtils
java.lang.Object
org.apache.xml.security.utils.JavaUtils
A collection of different, general-purpose methods for JAVA-specific things
- Author:
- Christian Geuer-Pollmann
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
getBytesFromFile
(String fileName) Method getBytesFromFilestatic 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
-
Method Details
-
getBytesFromFile
Method getBytesFromFile- Parameters:
fileName
-- Returns:
- the bytes readed from the file
- Throws:
FileNotFoundException
IOException
-
writeBytesToFilename
Method writeBytesToFilename- Parameters:
filename
-bytes
-
-
getBytesFromStream
This method reads all bytes from the given InputStream till EOF and returns them as a byte array.- Parameters:
inputStream
-- Returns:
- the bytes readed from the stream
- Throws:
FileNotFoundException
IOException
-