Package io.javalin.util
Object Util
-
- All Implemented Interfaces:
public class Util
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> Lazy<T>
createLazy(Supplier<T> init)
final static String
normalizeContextPath(String contextPath)
final static String
prefixContextPath(String contextPath, String path)
final Boolean
classExists(String className)
final static Unit
printHelpfulMessageIfLoggerIsMissing()
final static Unit
logJavalinVersion()
final String
getChecksumAndReset(ByteArrayInputStream inputStream)
final static URL
getResourceUrl(String path)
final URL
getFileUrl(String path)
final static String
getPort(Exception e)
final <T extends Any> T
findByClass(Map<Class<out Exception>, T> map, Class<out Exception> exceptionClass)
final <T extends Any> T
firstOrNull(Stream<T> $self)
final <T extends Any> T
firstOrNull(Stream<T> $self, Function1<T, Unit> body)
-
-
Method Detail
-
normalizeContextPath
final static String normalizeContextPath(String contextPath)
-
prefixContextPath
final static String prefixContextPath(String contextPath, String path)
-
classExists
final Boolean classExists(String className)
-
printHelpfulMessageIfLoggerIsMissing
final static Unit printHelpfulMessageIfLoggerIsMissing()
-
logJavalinVersion
final static Unit logJavalinVersion()
-
getChecksumAndReset
final String getChecksumAndReset(ByteArrayInputStream inputStream)
-
getResourceUrl
final static URL getResourceUrl(String path)
-
getFileUrl
final URL getFileUrl(String path)
-
findByClass
final <T extends Any> T findByClass(Map<Class<out Exception>, T> map, Class<out Exception> exceptionClass)
-
firstOrNull
final <T extends Any> T firstOrNull(Stream<T> $self)
-
-
-
-