Well, what does the string json look like?


If it is base64, it must contain only lowercase letters (26), uppercase 
letters (26), digits (10), a plus sign (1), a slash (1), and possibly end 
with some equals characters.



On Thursday, August 9, 2012 10:13:23 AM UTC-5, Иван Дунский wrote:
>
> Yeah, I tried both Base64.NO_PADDING and used string instead of 
> bytes[]...I get the same result...
>
>
>
> четверг, 9 августа 2012 г., 16:13:13 UTC+3 пользователь Harri Smått 
> написал:
>>
>> On Aug 9, 2012, at 3:24 PM, Иван Дунский <[email protected]> wrote: 
>> > What's is reason of it? 
>>
>> "java.lang.IllegalArgumentException:  bad base-64". Documentation states 
>> though; 
>>
>> 1. 
>> > The padding '=' characters at the end are considered optional, but if 
>> any are present, there must be the correct number of them. 
>>
>> 2. 
>> > Throws IllegalArgumentException if the input contains incorrect padding 
>>
>> Have you tried using NO_PADDING flag for Base64.decode(…)? Alternatively 
>> you could try using Base64.decode(json, flags), not json.getBytes(). 
>>
>> -- 
>> H
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to