Solved

Convert String from base64 to base32

Posted on 2002-06-10
6
552 Views
Last Modified: 2012-05-04
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
Comment
Question by:houtexdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7067996
Why do you need to convert to base32? Why not just decode it from base64?
0
 

Author Comment

by:houtexdev
ID: 7068348
I'm new to java....

How exactly would I do that?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 300 total points
ID: 7068394
This is the general idea:

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

0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:houtexdev
ID: 7068402
Is there a way to do it without interacting with the filesystem?  This is a multi-threaded server component on a web server.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7068410
Can you show me how you're getting the XML doc in the first place?
0
 

Author Comment

by:houtexdev
ID: 7070821
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to execute a Python program and gather return output in Java 2 63
Java class and jar 3 61
maximize the sum of fractions 33 76
How to fix  socket closed error 11 64
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question