Package net.bramp.ffmpeg
Class Preconditions
- java.lang.Object
-
- net.bramp.ffmpeg.Preconditions
-
public final class Preconditions extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcheckNotEmpty(String arg, Object errorMessage)Ensures the argument is not null, empty string, or just whitespace.static URIcheckValidStream(URI uri)Checks if the URI is valid for streaming to.
-
-
-
Method Detail
-
checkNotEmpty
public static String checkNotEmpty(String arg, @Nullable Object errorMessage)
Ensures the argument is not null, empty string, or just whitespace.- Parameters:
arg- The argumenterrorMessage- The exception message to use if the check fails- Returns:
- The passed in argument if it is not blank
-
checkValidStream
public static URI checkValidStream(URI uri) throws IllegalArgumentException
Checks if the URI is valid for streaming to.- Parameters:
uri- The URI to check- Returns:
- The passed in URI if it is valid
- Throws:
IllegalArgumentException- if the URI is not valid.
-
-