Package ej.storage.util
Class StorageHelper
- java.lang.Object
-
- ej.storage.util.StorageHelper
-
public class StorageHelper extends Object
Contains tools related to storage.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckID(String id)Checks that a storage ID is valid.static voidcheckOffset(long offset)Checks that an offset is valid.static booleanisValidID(String id)Checks whether a storage ID is valid or not.
-
-
-
Method Detail
-
checkID
public static void checkID(String id)
Checks that a storage ID is valid.- Parameters:
id- the storage ID to check.- Throws:
IllegalArgumentException- if the given storage identifier is not a valid identifier.
-
isValidID
public static boolean isValidID(String id)
Checks whether a storage ID is valid or not.- Parameters:
id- the storage ID to check.- Returns:
trueif the ID is valid,falseotherwise.
-
checkOffset
public static void checkOffset(long offset)
Checks that an offset is valid.- Parameters:
offset- the offset to check.- Throws:
IllegalArgumentException- if the given offset is negative.
-
-