Class ResourceHandler
java.lang.Object
org.eblocker.server.icap.resources.ResourceHandler
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreate(EblockerResource resource) static booleanexists(EblockerResource resource) Tests whether the resource exists.static InputStreamstatic DategetDate(EblockerResource resource) static InputStreamgetInputStream(EblockerResource resource) static Stringload(EblockerResource resource) readLines(EblockerResource resource) readLinesAsSet(EblockerResource resource) static voidreplaceContent(EblockerResource resource, Iterable<String> lines) static voidreplaceContent(EblockerResource resource, java.nio.file.Path temp) static voidwrite(EblockerResource resource, String content) Write a String to a resource filestatic voidwriteLines(EblockerResource resource, Collection<String> lines)
-
Field Details
-
CLASSPATH_PREFIX
- See Also:
-
FILE_PREFIX
- See Also:
-
-
Method Details
-
exists
Tests whether the resource exists. Note that resources with a relative path are searched in the class path, not in the file system (backward compatibility).- Parameters:
resource-- Returns:
- true if the resource exists
-
load
-
readLines
-
readLinesAsSet
-
getInputStream
-
getClassPathInputStream
-
replaceContent
-
create
-
replaceContent
-
getDate
-
write
Write a String to a resource file- Parameters:
resource-content- String to write to resource
-
writeLines
-