class Base64Encoder {

  public static byte[] getBytes(final String base64String) {
    final Base64 codec = new Base64();
    final byte[] encodedBytes = StringEncoder.getBytes(base64String);
    if (!codec.isInAlphabet(encodedBytes, true)) {
      throw new IllegalArgumentException("malformed base64 string passed to getBytes");
    }

    return codec.decode(encodedBytes);
  }

  private  Base64Encoder();

}