TIMOB-15594-Used Base64OutputStream to encode
Merge pull request #5733 from hieupham007/timob-15594-3_3_X

[Timob 15594] (3_3_x): Backport of base64 encoding failing on large files