4 Replies - 4372 Views - Last Post: 26 November 2012 - 08:13 PM

#1 shango11  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 77
  • Joined: 06-July 11

is there a DatatypeConverter for the android?

Posted 26 November 2012 - 07:18 PM

I recently tried to use DatatypeConverter and to my surprise there is no such thing for the androind, is there an equivalent I can use?
Is This A Good Question/Topic? 0
  • +

Replies To: is there a DatatypeConverter for the android?

#2 H3R3T1C  Icon User is offline

  • Android Expert
  • member icon

Reputation: 277
  • View blog
  • Posts: 757
  • Joined: 30-March 07

Re: is there a DatatypeConverter for the android?

Posted 26 November 2012 - 07:26 PM

The is no "equivalent" to that in android but I bet there are other ways to accomplish what you are trying to do in android. What is it that you are trying to do?
Was This Post Helpful? 1
  • +
  • -

#3 shango11  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 77
  • Joined: 06-July 11

Re: is there a DatatypeConverter for the android?

Posted 26 November 2012 - 07:31 PM

I'm trying to do something along the lines of:
byte[] b2 = DatatypeConverter.parseBase64Binary(res);


Was This Post Helpful? 0
  • +
  • -

#4 H3R3T1C  Icon User is offline

  • Android Expert
  • member icon

Reputation: 277
  • View blog
  • Posts: 757
  • Joined: 30-March 07

Re: is there a DatatypeConverter for the android?

Posted 26 November 2012 - 07:48 PM

Try the Base64 class. http://developer.and...til/Base64.html
I dont think whitespace is allowed when using .decode(...) so make sure to remove all whitespace from the base64 string
Was This Post Helpful? 1
  • +
  • -

#5 shango11  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 77
  • Joined: 06-July 11

Re: is there a DatatypeConverter for the android?

Posted 26 November 2012 - 08:13 PM

View PostH3R3T1C, on 26 November 2012 - 07:48 PM, said:

Try the Base64 class. http://developer.and...til/Base64.html
I dont think whitespace is allowed when using .decode(...) so make sure to remove all whitespace from the base64 string


Exactly what I needed! Thanks for the help!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1