Skip to main content

Difference between base64Binary and base64

2 replies [Last post]
mects
Offline
Joined: 2009-05-19

Hi all,

I would like to know the clear difference between base64 and base64Binary.

Kindly help.

Regards,
mects

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hgupta
Offline
Joined: 2009-09-01

I will put sample in next post , both are same from my initial investigation.

Message was edited by: hgupta

hgupta
Offline
Joined: 2009-09-01

This is the sample code that works for me...
File file = new File("c:\\temp\\test.csv");
String str="IiAgICAgICAgICIsIiAg0K";
byte[] base64Data=str.getBytes();
byte[] s1=Base64.decodeBase64(base64Data);
FileOutputStream fos=new FileOutputStream(file);
for (int i=0;i fos.write(s1[i]);
fos.close();
Hope that will help the starters