code: public static byte[] decode(String s) {
          int delta = s.endsWith( "==" ) ? 2 : s.endsWith( "=" ) ? 1 : 0;
          byte[] buffer = new byte[s.length() * 3 / 4 - delta];
          int mask = 0xFF;
          int index = 0;
          for (int i = 0; i < s.length(); i += 4) {
              int c0 = toInt[s.charAt( i )];
              int c1 = toInt[s.charAt( i + 1)];
              buffer[index++] = (byte)(((c0 << 2) | (c1 >> 4)) & mask);
              if (index >= buffer.length) {
                  return buffer;
              }
              int c2 = toInt[s.charAt( i + 2)];
              buffer[index++] = (byte)(((c1 << 4) | (c2 >> 2)) & mask);
              if (index >= buffer.length) {
                  return buffer;
              }
              int c3 = toInt[s.charAt( i + 3 )];
              buffer[index++] = (byte)(((c2 << 6) | c3) & mask);
          }
          return buffer;
      }
docs: Translates the specified Base64 string into a byte array.
  
  @param s the Base64 string (not null)
  @return the byte array (not null)