Class WebResourceClassloaderReader

java.lang.Object
org.eclnt.jsfserver.util.WebResourceClassloaderReader

public class WebResourceClassloaderReader extends Object
Processing on top of WebResourceReader and ClassloaderReader. First resources are checked in the classLoader afterwards in the web content.
  • Constructor Details

    • WebResourceClassloaderReader

      public WebResourceClassloaderReader()
  • Method Details

    • resetBuffers

      public static void resetBuffers()
    • registerPathWithReadingWebResourceFirst

      public static void registerPathWithReadingWebResourceFirst(String path)
      By default files are first read from the classloader, then from the web resource reader. For dedicated paths this can be switched.
    • registerPathToIgore

      public static void registerPathToIgore(String path)
      Register path for files that must be ignored - but must be passed through.
    • readUTF8FileIntoString

      public static String readUTF8FileIntoString(String resourcePath, boolean withError)
    • readUTF8FilesIntoStrings

      public static List<String> readUTF8FilesIntoStrings(String resourcePath, boolean withError)
      Special reader for configuration files: if found in the class loader then there may be multiple occurrences (multiple .jar files having the same configuration file inside).
    • readUTF8FileIntoStringForExternalUsage

      public static String readUTF8FileIntoStringForExternalUsage(String resourcePath, boolean withError)
      Method for reading - with checking if the resourcePath is valid to be read by some functions that access the system from outside (via URL).
    • readUTF8FileIntoResultString

      public static WebResourceClassloaderReader.ResultString readUTF8FileIntoResultString(String resourcePath, boolean withError)
    • checkIfFileExists

      public static boolean checkIfFileExists(String resourcePath)
    • readUTF8File

      public static String readUTF8File(String resourcePath)
    • readFileIntoByteArray

      public static byte[] readFileIntoByteArray(String resourcePath)
    • readFileIntoResultBytes

      public static WebResourceClassloaderReader.ResultBytes readFileIntoResultBytes(String resourcePath)
    • readFileIntoInputStream

      public static InputStream readFileIntoInputStream(String resourcePath)
    • readFileIntoResultInputStream

      public static WebResourceClassloaderReader.ResultInputStream readFileIntoResultInputStream(String resourcePath)
    • getFileNameVariantsInPathDirectoryByPattern

      public static List<String> getFileNameVariantsInPathDirectoryByPattern(String path, String pattern, String extension)
      A configuration file may occur multiple times in the webcontent. E.g. resources.xml may also be added as resources.xml.ccaddons. This method picks the file path variants for one given path.
    • getFilesInPathDirectory

      public static Set<String> getFilesInPathDirectory(String path)
    • getFilesInPathDirectory

      public static Set<String> getFilesInPathDirectory(String path, String extension)
    • getDirectoriesInPathDirectory

      public static List<String> getDirectoriesInPathDirectory(String path)