Package com.github.alex1304.jdash.util
Class Utils
- java.lang.Object
-
- com.github.alex1304.jdash.util.Utils
-
public final class Utils extends Object
Contains utility static methods- Author:
- Alex1304
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringb64Decode(String str)static byte[]b64DecodeToBytes(String str)static Stringb64Encode(String str)static StringdefaultStringIfEmptyOrNull(String str, String fallback)static GDSonggetAudioTrack(int id)Gets an audio track by its IDstatic StringurlDecode(String str)static StringurlEncode(String str)static DemonDifficultyvalueToDemonDifficulty(int value)static DifficultyvalueToDifficulty(int value)
-
-
-
Method Detail
-
getAudioTrack
public static GDSong getAudioTrack(int id)
Gets an audio track by its ID- Parameters:
id- - the audio track id- Returns:
- GDSong
-
valueToDifficulty
public static Difficulty valueToDifficulty(int value)
-
valueToDemonDifficulty
public static DemonDifficulty valueToDemonDifficulty(int value)
-
defaultStringIfEmptyOrNull
public static String defaultStringIfEmptyOrNull(String str, String fallback)
-
b64DecodeToBytes
public static byte[] b64DecodeToBytes(String str)
-
-