Package net.uptheinter.interceptify.util
Class Util
java.lang.Object
net.uptheinter.interceptify.util.Util
General utility class with a few modestly useful functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
DebugError
(Throwable exception) Prints an exception's message and stack trace to stderr.static URL
This is a convenience function for trying to convert a Path to a URI.
Prints to stderr if an exception is thrown.It'sFiles.walk(java.nio.file.Path, int, java.nio.file.FileVisitOption...)
, but it catches exceptions and logs them.
-
Method Details
-
DebugError
Prints an exception's message and stack trace to stderr.- Parameters:
exception
- The exception to print.
-
toURL
This is a convenience function for trying to convert a Path to a URI.
Prints to stderr if an exception is thrown.- Parameters:
path
- A path that you wish to convert into a URL- Returns:
- a URL generated from the path, or null if it fails.
-
walk
It'sFiles.walk(java.nio.file.Path, int, java.nio.file.FileVisitOption...)
, but it catches exceptions and logs them.- Parameters:
path
- same as forFiles.walk(Path, int, FileVisitOption...)
depth
- ditto.- Returns:
- the return value also has the same semantics.
-