docs: public static int decodeTo(final byte[] output, int outOffset, 
              final String str, int inOffset, final int inLen)
      {
          if(inLen == 0)
              return 0;
          
          if (inLen%4!=0)
              throw new IllegalArgumentException("Input block size is not 4");
  
          int withoutPaddingLen = inLen, limit = inOffset + inLen;
          while (str.charAt(--limit)==pad)
              withoutPaddingLen--;
  
          // Create result array of exact required size.
          final int outLen=((withoutPaddingLen)*3)/4;
          //assert (output.length - outOffset) >= outLen;
          
          decode(str, inOffset, inLen, output, outOffset, outLen);
  
          return outLen;
      }