StreamUtils (IcedTea-Web: NetX )
Keywords: net.sourceforge.jnlp.util.StreamUtils class
Date: 2016-05-12

net.sourceforge.jnlp.util

## Class StreamUtils

- java.lang.Object
- - net.sourceforge.jnlp.util.StreamUtils

-     public class StreamUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `closeSilently(java.io.Closeable stream)` Closes a stream, without throwing IOException.
    `static void` | `copyStream(java.io.InputStream input, java.io.OutputStream output)` Copy an input stream's contents into an output stream.
    `static java.lang.String` | `readStreamAsString(java.io.InputStream stream)`
    `static java.lang.String` | `readStreamAsString(java.io.InputStream stream, boolean includeEndOfLines)`
    `static java.lang.String` | `readStreamAsString(java.io.InputStream stream, boolean includeEndOfLines, java.lang.String encoding)`
    `static java.lang.String` | `readStreamAsString(java.io.InputStream stream, java.lang.String encoding)`

    - ### 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

    - #### closeSilently

          public static void closeSilently(java.io.Closeable stream)

      Closes a stream, without throwing IOException. In IOException is properly logged and consumed
      Parameters:
        `stream` - the stream that will be closed

    - #### copyStream

          public static void copyStream(java.io.InputStream input,
                        java.io.OutputStream output)
                                 throws java.io.IOException

      Copy an input stream's contents into an output stream.
      Parameters:
        `input` - input stream
        `output` - stream where to copy input
      Throws:
        `java.io.IOException` - if IO fails

    - #### readStreamAsString

          public static java.lang.String readStreamAsString(java.io.InputStream stream)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readStreamAsString

          public static java.lang.String readStreamAsString(java.io.InputStream stream,
                                            java.lang.String encoding)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readStreamAsString

          public static java.lang.String readStreamAsString(java.io.InputStream stream,
                                            boolean includeEndOfLines)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readStreamAsString

          public static java.lang.String readStreamAsString(java.io.InputStream stream,
                                            boolean includeEndOfLines,
                                            java.lang.String encoding)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

Submit a bug or feature