org.eclnt.jsfserver.util

## Class WebResourceReader

- java.lang.Object
- - org.eclnt.jsfserver.util.WebResourceReader

-     public class WebResourceReader
      extends java.lang.Object

  Access to web application's file system through the servlet context.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebResourceReader()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<java.lang.String>` | `getDirectoriesInPathDirectory(java.lang.String path)`
    `static java.util.Set<java.lang.String>` | `getFilesInPathDirectory(ServletContext servletContext, java.lang.String path, java.lang.String extension)`
    `static java.util.Set<java.lang.String>` | `getFilesInPathDirectory(java.lang.String path, java.lang.String extension)`
    `static java.util.List<java.lang.String>` | `getFilesInPathDirectoryByPattern(ServletContext servletContext, java.lang.String path, java.lang.String pattern, java.lang.String extension)`
    `static java.util.List<java.lang.String>` | `getFilesInPathDirectoryByPattern(java.lang.String path, java.lang.String pattern, java.lang.String extension)`
    `static java.lang.String` | `getRealPath(java.lang.String path)` Not supported with all application servers!
    `static void` | `intialize(ServletContext servletContext)`
    `static byte[]` | `readFileIntoByteArray(java.lang.String resourcePath)` Reads one file from servlet context.
    `static byte[]` | `readFileIntoByteArray(java.lang.String resourcePath, ServletContext servletContext)` Reads one file from servlet context.
    `static java.lang.String` | `readUTF8FileIntoString(java.lang.String resourcePath)` Reads one file from servlet context.
    `static java.lang.String` | `readUTF8FileIntoString(java.lang.String resourcePath, boolean withError)`
    `static java.lang.String` | `readUTF8FileIntoString(java.lang.String resourcePath, ServletContext servletContext, boolean withError)` Reads one file from servlet context.

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

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

- - ### Constructor Detail

    - #### WebResourceReader

          public WebResourceReader()

  - ### Method Detail

    - #### intialize

          public static void intialize(ServletContext servletContext)

    - #### readUTF8FileIntoString

          public static java.lang.String readUTF8FileIntoString(java.lang.String resourcePath)

      Reads one file from servlet context. The enoding used for encoding the string is UTF-8.

    - #### readUTF8FileIntoString

          public static java.lang.String readUTF8FileIntoString(java.lang.String resourcePath,
                                                                ServletContext servletContext,
                                                                boolean withError)

      Reads one file from servlet context. The enoding used for encoding the string is UTF-8.

    - #### readUTF8FileIntoString

          public static java.lang.String readUTF8FileIntoString(java.lang.String resourcePath,
                                                                boolean withError)

    - #### readFileIntoByteArray

          public static byte[] readFileIntoByteArray(java.lang.String resourcePath)

      Reads one file from servlet context.

    - #### readFileIntoByteArray

          public static byte[] readFileIntoByteArray(java.lang.String resourcePath,
                                                     ServletContext servletContext)

      Reads one file from servlet context.

    - #### getRealPath

          public static java.lang.String getRealPath(java.lang.String path)

      Not supported with all application servers!
      Parameters:
        `path` -
      Returns:

    - #### getFilesInPathDirectoryByPattern

          public static java.util.List<java.lang.String> getFilesInPathDirectoryByPattern(java.lang.String path,
                                                                                          java.lang.String pattern,
                                                                                          java.lang.String extension)

    - #### getFilesInPathDirectoryByPattern

          public static java.util.List<java.lang.String> getFilesInPathDirectoryByPattern(ServletContext servletContext,
                                                                                          java.lang.String path,
                                                                                          java.lang.String pattern,
                                                                                          java.lang.String extension)

    - #### getFilesInPathDirectory

          public static java.util.Set<java.lang.String> getFilesInPathDirectory(java.lang.String path,
                                                                                java.lang.String extension)

    - #### getFilesInPathDirectory

          public static java.util.Set<java.lang.String> getFilesInPathDirectory(ServletContext servletContext,
                                                                                java.lang.String path,
                                                                                java.lang.String extension)

    - #### getDirectoriesInPathDirectory

          public static java.util.List<java.lang.String> getDirectoriesInPathDirectory(java.lang.String path)

Copyright © CaptainCasa Gmbh. All Rights Reserved.