public static final int compareByteArrays(final byte[] a, final byte[] b) {
		if (a == null) {
			return -1;
		} else if (b == null) {
			return 1;
		} else {
			final int min = Math.min(a.length, b.length);
			for (int i = 0; i < min; i++) {
				final int cmp = compareBytes(a[i], b[i]);
				if (cmp != 0) {
					return cmp;
				}
			}
			if (a.length > b.length) {
				return +1;
			} else if (b.length > a.length) {
				return -1;
			}
			return 0;
		}

	}