Published: Jan 16 2014 / 07:54
Discussing converting streams to strings without discussing encodings misses the mark - using String,getBytes() is just bad.
"using String,getBytes() is just bad". Agreed. But he was just using that to simulate an actual input stream. He didn't use it in any of the examples he gave for decoding the stream.
Agreed - that is why all 3 examples specify their encoding so that the system default is not used. Cheers, Eugen.
Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.
Advertising - Terms of Service - Privacy - © 1997-2014, DZone, Inc.