Class PhiveBinaryHelper

java.lang.Object
com.helger.phive.binary.PhiveBinaryHelper

@Immutable public final class PhiveBinaryHelper extends Object
Helper classes
Author:
Philip Helger
  • Method Details

    • isValidFileExtension

      public static boolean isValidFileExtension(@Nullable String s)
      Check if the provided file extension is valid or not. Valid file extensions are non-empty, don't start with a dot and are all-lowercase.
      Parameters:
      s - The file extension to check. May be null.
      Returns:
      true if it is valid, false if not.
    • isValidMimeType

      public static boolean isValidMimeType(@Nullable String s)
      Check if the provided MIME Type is valid or not. Valid MIME Types are non-empty, are all-lowercase and contain no parameters.
      Parameters:
      s - The MIME type to check. May be null.
      Returns:
      true if it is valid, false if not.