org.richfaces.util

## Class StreamUtils

- java.lang.Object
- - org.richfaces.util.StreamUtils

-     public class StreamUtils
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `copy(InputStream is, OutputStream os)` Copies all bytes from input stream to output stream.
    `static byte[]` | `toByteArray(InputStream is)` Reads all bytes from an input stream to a byte array.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StreamUtils

          public StreamUtils()

  - ### Method Detail

    - #### toByteArray

          public static byte[] toByteArray(InputStream is)
                                    throws IOException

      Reads all bytes from an input stream to a byte array. Does not close the stream
      Parameters:
        `is` -
      Returns:
        all bytes from an input stream
      Throws:
        `IOException`

    - #### copy

          public static void copy(InputStream is,
                  OutputStream os)
                           throws IOException

      Copies all bytes from input stream to output stream. Does not flush or close either stream
      Parameters:
        `is` -
        `os` -
      Throws:
        `IOException`

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.