<bdo id='yxd2h'></bdo><ul id='yxd2h'></ul>

<legend id='yxd2h'><style id='yxd2h'><dir id='yxd2h'><q id='yxd2h'></q></dir></style></legend>
    <i id='yxd2h'><tr id='yxd2h'><dt id='yxd2h'><q id='yxd2h'><span id='yxd2h'><b id='yxd2h'><form id='yxd2h'><ins id='yxd2h'></ins><ul id='yxd2h'></ul><sub id='yxd2h'></sub></form><legend id='yxd2h'></legend><bdo id='yxd2h'><pre id='yxd2h'><center id='yxd2h'></center></pre></bdo></b><th id='yxd2h'></th></span></q></dt></tr></i><div id='yxd2h'><tfoot id='yxd2h'></tfoot><dl id='yxd2h'><fieldset id='yxd2h'></fieldset></dl></div>

        <tfoot id='yxd2h'></tfoot>

      1. <small id='yxd2h'></small><noframes id='yxd2h'>

        错误的 base-64 错误

        Bad base-64 error(错误的 base-64 错误)
          <tbody id='l454P'></tbody>

          <bdo id='l454P'></bdo><ul id='l454P'></ul>

            • <i id='l454P'><tr id='l454P'><dt id='l454P'><q id='l454P'><span id='l454P'><b id='l454P'><form id='l454P'><ins id='l454P'></ins><ul id='l454P'></ul><sub id='l454P'></sub></form><legend id='l454P'></legend><bdo id='l454P'><pre id='l454P'><center id='l454P'></center></pre></bdo></b><th id='l454P'></th></span></q></dt></tr></i><div id='l454P'><tfoot id='l454P'></tfoot><dl id='l454P'><fieldset id='l454P'></fieldset></dl></div>
              <tfoot id='l454P'></tfoot>
            • <small id='l454P'></small><noframes id='l454P'>

              • <legend id='l454P'><style id='l454P'><dir id='l454P'><q id='l454P'></q></dir></style></legend>

                  本文介绍了错误的 base-64 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在以下代码中收到java.lang.IllegalArgumentException: bad base-64":

                  I'm getting a "java.lang.IllegalArgumentException: bad base-64" on the following code:

                  byte[] msgBytes = Base64.decode(msgStr, Base64.NO_WRAP);
                  

                  msgString 是一个字符串,就在这一行之前,我检查了 msgStr 的值,它是fl-ILw==".有什么问题吗?

                  msgString is a String, and right before this line, I check the value of msgStr and it is "fl-ILw==". Is there anything wrong?

                  谢谢.

                  推荐答案

                  根据 RFC 4648(http://www.rfc-editor.org/rfc/rfc4648.txt) '-' 字符不是有效的 Base64 字符,但另一方面对URL 和文件名安全的 Base 64 字母"有效.

                  According to RFC 4648(http://www.rfc-editor.org/rfc/rfc4648.txt) '-' character is not a valid Base64 character but on the other hand is valid for "URL and Filename safe Base 64 Alphabet".

                  因此您可以根据字符串的预期格式使用 Base64.URL_SAFE.

                  So you could use Base64.URL_SAFE depending of the expected format of the string.

                  这篇关于错误的 base-64 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;No visible @interface for #39;NSData#39; declares the selector #39;base64EncodedStringquot; error in MKStoreKit(“‘NSData’没有可见的@interface 声明选择器‘base64EncodedString’MKStoreKit 中的错误)
                  How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)
                  cocos2d-android: how to display score(cocos2d-android:如何显示分数)
                  Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
                  SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
                  Android file copy(安卓文件拷贝)
                  <tfoot id='Q50fk'></tfoot>
                  • <bdo id='Q50fk'></bdo><ul id='Q50fk'></ul>

                    <small id='Q50fk'></small><noframes id='Q50fk'>

                      <tbody id='Q50fk'></tbody>
                    <i id='Q50fk'><tr id='Q50fk'><dt id='Q50fk'><q id='Q50fk'><span id='Q50fk'><b id='Q50fk'><form id='Q50fk'><ins id='Q50fk'></ins><ul id='Q50fk'></ul><sub id='Q50fk'></sub></form><legend id='Q50fk'></legend><bdo id='Q50fk'><pre id='Q50fk'><center id='Q50fk'></center></pre></bdo></b><th id='Q50fk'></th></span></q></dt></tr></i><div id='Q50fk'><tfoot id='Q50fk'></tfoot><dl id='Q50fk'><fieldset id='Q50fk'></fieldset></dl></div>
                        • <legend id='Q50fk'><style id='Q50fk'><dir id='Q50fk'><q id='Q50fk'></q></dir></style></legend>