package org.theonefx.wcframework.utils;
public abstract class ArrayUtils {
public static boolean isEndWith(byte[] bytes, byte[] end, int offset) {
if (end.length == 0) {
return true;
}
if (bytes.length - offset < end.length) {
return false;
}
for (int i = (end.length - 1); i >= 0; i--) {
if (bytes[offset + i] != end[i]) {
return false;
}
}
return true;
}
public static boolean isEmptyArray(Object[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
}
public static boolean isEmpty2dArray(Object[] array) {
if (array == null || array.length == 0) {
return true;
}
for (Object o : array) {
Object[] oo = (Object[]) o;
if (oo != null && oo.length > 0) {
return false;
}
}
return true;
}
}