org.ajax4jsf.resource.util

## Class URLToStreamHelper

- java.lang.Object
- - org.ajax4jsf.resource.util.URLToStreamHelper

-     public final class URLToStreamHelper
      extends Object

  Utility class to solve JAR locking issue using `URLConnection.setUseCaches(boolean)` method. Contains one utility method that gets `InputStream` from `URL` with caching disabled. Created 07.02.2008
  Since:
    3.2
  Author:
    Nick Belaevski

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InputStream` | `urlToStream(URL url)` Returns `InputStream` corresponding to argument `URL` but with caching disabled
    `static InputStream` | `urlToStreamSafe(URL url)` Variant of `urlToStream(URL)` method that doesn't throw IOException, but silently ignores them

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

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

- - ### Method Detail

    - #### urlToStream

          public static InputStream urlToStream(URL url)
                                         throws IOException

      Returns `InputStream` corresponding to argument `URL` but with caching disabled
      Parameters:
        `url` - `URL` of the resource
      Returns:
        `InputStream` instance or `null`
      Throws:
        `IOException`

    - #### urlToStreamSafe

          public static InputStream urlToStreamSafe(URL url)

      Variant of `urlToStream(URL)` method that doesn't throw IOException, but silently ignores them
      Parameters:
        `url` -
      Returns:
        `InputStream` instance or `null`

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