Package org.eclnt.jsfserver.util
Class WebResourceClassloaderReader
java.lang.Object
org.eclnt.jsfserver.util.WebResourceClassloaderReader
Processing on top of
WebResourceReader and ClassloaderReader.
First resources are checked in the classLoader afterwards in the web content.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckIfFileExists(String resourcePath) getFileNameVariantsInPathDirectoryByPattern(String path, String pattern, String extension) A configuration file may occur multiple times in the webcontent.getFilesInPathDirectory(String path, String extension) static byte[]readFileIntoByteArray(String resourcePath) static InputStreamreadFileIntoInputStream(String resourcePath) readFileIntoResultBytes(String resourcePath) readFileIntoResultInputStream(String resourcePath) static StringreadUTF8File(String resourcePath) readUTF8FileIntoResultString(String resourcePath, boolean withError) static StringreadUTF8FileIntoString(String resourcePath, boolean withError) static StringreadUTF8FileIntoStringForExternalUsage(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).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).static voidregisterPathToIgore(String path) Register path for files that must be ignored - but must be passed through.static voidBy default files are first read from the classloader, then from the web resource reader.static void
-
Constructor Details
-
WebResourceClassloaderReader
public WebResourceClassloaderReader()
-
-
Method Details
-
resetBuffers
public static void resetBuffers() -
registerPathWithReadingWebResourceFirst
By default files are first read from the classloader, then from the web resource reader. For dedicated paths this can be switched. -
registerPathToIgore
Register path for files that must be ignored - but must be passed through. -
readUTF8FileIntoString
-
readUTF8FilesIntoStrings
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
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
-
readUTF8File
-
readFileIntoByteArray
-
readFileIntoResultBytes
-
readFileIntoInputStream
-
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
-
getFilesInPathDirectory
-
getDirectoriesInPathDirectory
-