<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anton0825</author_name>
  <author_url>https://blog.hatena.ne.jp/anton0825/</author_url>
  <blog_title>日々精進</blog_title>
  <blog_url>https://anton0825.hatenablog.com/</blog_url>
  <categories>
    <anon>IT</anon>
  </categories>
  <description>原因はBase64.decodeに渡した文字列が4で割り切れない文字数になっているため。 Base64は64種類の文字でバイナリデータを表現しているため、1文字が6bitに相当する。なので4文字＝24bitを1セットとしてエンコードする。 エンコードするデータが24bitで割り切れない場合は余った分=を詰める。これがpadding。何らかの原因でpaddingがされなかったものと思われるので、普通はpaddingすればエラーは消える。が、「=」をpaddingしてもエラーが消えなかったのでBase64.decodeのソースコードを読んでみると、データの末尾2bitが0であることをチェックしてい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F2022%2F07%2F08%2F203015&quot; title=&quot;Base64.decodeで「java.lang.IllegalArgumentException: Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value. Expected the discarded bits to be zero.」エラー - 日々精進&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-08 20:30:15</published>
  <title>Base64.decodeで「java.lang.IllegalArgumentException: Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value. Expected the discarded bits to be zero.」エラー</title>
  <type>rich</type>
  <url>https://anton0825.hatenablog.com/entry/2022/07/08/203015</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
