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
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkIfFileExists
(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 InputStream
readFileIntoInputStream
(String resourcePath) readFileIntoResultBytes
(String resourcePath) readFileIntoResultInputStream
(String resourcePath) static String
readUTF8File
(String resourcePath) readUTF8FileIntoResultString
(String resourcePath, boolean withError) static String
readUTF8FileIntoString
(String resourcePath, boolean withError) 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).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 void
registerPathToIgore
(String path) Register path for files that must be ignored - but must be passed through.static void
By 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
-