Tuesday, 27 August 2013

How to remove null character from file content in java

How to remove null character from file content in java

I receive an XML file from a client. I've another file containing Base-64
encoded data which I embed in one of the elements in XML file. After doing
all this merging, I need to return the content of file either as string or
a DOM object, returning as InputStream will not work.
But the resulting merged file has null character at the end which is
causing issues when file is processed as XML. How can I get rid of it.

No comments:

Post a Comment