Class Preconditions

java.lang.Object
net.bramp.ffmpeg.Preconditions

public final class Preconditions extends Object
  • Method Details

    • checkNotEmpty

      public static String checkNotEmpty(String arg, @Nullable Object errorMessage)
      Ensures the argument is not null, empty string, or just whitespace.
      Parameters:
      arg - The argument
      errorMessage - 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.