I am working with Base64 encoding & Decoding of all types of files, I get the stream from socket. I tried using Base64 encoder & Base64Decoder class from Java2s website. It works fine encoding & decoding for the txt file & png files. But when I try with doc/xls/pdf it fails, it says file corrupted, after decoding.
I tried even with Apache common codec jar Base64. I didnot understand how to use with InputStreams, I see it works for String.
Any help please.