How does this method give me a -61 Error?

后端 未结 1 1480
情书的邮戳
情书的邮戳 2021-01-20 09:13

This is in an application I am using called Mirth, but it appears to be coming from inside an Apache Commons library from a method that checks if something is indeed Base64

相关标签:
1条回答
  • 2021-01-20 10:01

    It's likely an ArrayIndexOutOfBoundsException. The -61 is supposedly the index.

    From http://kickjava.com/src/org/apache/commons/codec/binary/Base64.java.htm:

    134     private  static boolean isBase64(byte octect) {
    135         if (octect == PAD) {
    136             return true;
    137         } else if (base64Alphabet[octect] == -1) { // <---
    138             return false;
    139         } else {
    140             return true;
    141         }
    142     }
    

    Apparently the input isn't Base64 encoded.

    0 讨论(0)
提交回复
热议问题