public static byte[] decode(String s) {
    if (s.length() == 0) return ArrayUtilRt.EMPTY_BYTE_ARRAY;

    int i = 0;
    for (int j = s.length() - 1; j > 0 && s.charAt(j) == '='; j--) {
      i++;
    }

    int len = (s.length() * 6) / 8 - i;
    byte[] raw = new byte[len];
    int l = 0;
    for (int i1 = 0; i1 < s.length(); i1 += 4) {
      int n = s.length() - i1;
      if (n == 1) throw new IllegalArgumentException("Invalid Base64 string");
      int j1 = (getValue(s.charAt(i1)) << 18) +
               (getValue(s.charAt(i1 + 1)) << 12) +
               (n > 2 ? (getValue(s.charAt(i1 + 2)) << 6) : 0) +
               (n > 3 ? (getValue(s.charAt(i1 + 3))) : 0);
      for (int k = 0; k < 3 && l + k < raw.length; k++) {
        raw[l + k] = (byte)(j1 >> 8 * (2 - k) & 0xff);
      }
      l += 3;
    }
    return raw;
  }
public static byte[] decode(String s)