How can I overcome the string size limitation.
It seems that calling decode on Strings of size greater than 64k fails.
is = con.openInputStream();
String str = new String(IOUtilities.streamToBytes(is), "UTF-8");
byte[] theArray = Base64InputStream.decode(str);
Ive tried alsorts, including using
Base64InputStream bs64 = new Base64InputStream(is);
And then trying to take from the bs64 stream.
It seems however, reading a large size leads to decode error. (Where it wouldnt error if size below 64k the origional way. I spent all day trying to figure this one..
You can decode your string in smaller chunks. Decode chunks of 3 bytes or a multitude of 3 bytes (1024 will do nicely) at a time.