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 String
b64Decode(String str)
static byte[]
b64DecodeToBytes(String str)
static String
b64Encode(String str)
static String
defaultStringIfEmptyOrNull(String str, String fallback)
static GDSong
getAudioTrack(int id)
Gets an audio track by its IDstatic String
urlDecode(String str)
static String
urlEncode(String str)
static DemonDifficulty
valueToDemonDifficulty(int value)
static Difficulty
valueToDifficulty(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)
-
-