Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.security.utils
Class JavaUtils

    java.lang.Object
      org.apache.xml.security.utils.JavaUtils

    public class JavaUtils

extends java.lang.Object

A collection of different, general-purpose methods for JAVA-specific things

Author:
  Christian Geuer-Pollmann

Method Summary
`static byte[]` | `getBytesFromFile(java.lang.String fileName)` Method getBytesFromFile
`static byte[]` | `getBytesFromStream(java.io.InputStream inputStream)` This method reads all bytes from the given InputStream till EOF and returns them as a byte array.
`static void` | `writeBytesToFilename(java.lang.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

### getBytesFromFile

    public static byte[] getBytesFromFile(java.lang.String fileName)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException

  Method getBytesFromFile

  Parameters:
    `fileName` -
  Returns:
    the bytes read from the file
  Throws:
    `java.io.FileNotFoundException`
    `java.io.IOException`

### writeBytesToFilename

    public static void writeBytesToFilename(java.lang.String filename,
                                            byte[] bytes)

  Method writeBytesToFilename

  Parameters:
    `filename` -
    `bytes` -

### getBytesFromStream

    public static byte[] getBytesFromStream(java.io.InputStream inputStream)
                                     throws java.io.IOException

  This method reads all bytes from the given InputStream till EOF and returns them as a byte array.

  Parameters:
    `inputStream` -
  Returns:
    the bytes read from the stream
  Throws:
    `java.io.FileNotFoundException`
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD