guava/src/com/google/common/io/BaseEncoding.java
final byte[] decodeChecked(CharSequence chars)
      throws DecodingException {
    chars = trimTrailingPadding(chars);
    byte[] tmp = new byte[maxDecodedSize(chars.length())];
    int len = decodeTo(tmp, chars);
    return extract(tmp, len);
  }
final byte[] decodeChecked(CharSequence chars)
      throws DecodingException {
    chars = trimTrailingPadding(chars);
    byte[] tmp = new byte[maxDecodedSize(chars.length())];
    int len = decodeTo(tmp, chars);
    return extract(tmp, len);
  }
Decodes the specified character sequence, and returns the resulting {@code byte[]}. This is the
inverse operation to {@link #encode(byte[])}.

@throws DecodingException if the input is not a valid encoded string according to this
encoding.