• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

Convert String from base64 to base32

I have a function that expects a string with some special characters (tabs, spaces, line feeds, etc.)

I have an XML document that I'm retrieving from a web service which contains this data.  The data is in a base64 format because of the validation issues with xml, of course.  I can get the base64 string in to a variable.  how can I convert this string to base32 so that I can pass it off to my function?
0
houtexdev
Asked:
houtexdev
  • 3
  • 3
1 Solution
 
CEHJCommented:
Why do you need to convert to base32? Why not just decode it from base64?
0
 
houtexdevAuthor Commented:
I'm new to java....

How exactly would I do that?
0
 
CEHJCommented:
This is the general idea:

InputStream is=connection.getInputStream();
FileOutputStream fos= ...;
new sun.misc.BASE64Decoder().decodeBuffer(is,fos);

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
houtexdevAuthor Commented:
Is there a way to do it without interacting with the filesystem?  This is a multi-threaded server component on a web server.
0
 
CEHJCommented:
Can you show me how you're getting the XML doc in the first place?
0
 
houtexdevAuthor Commented:
Never mind, I got off of my lazy a** and wrote a function to take care of it myself.  

Thanks for the help, though.  I'll give you the points
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now