Reputation: 189
I have a tab delimited file and I need to pass it around. I will be using BufferedReader to read lines. In that case does passing it as a byte[] vs String have any advantages and disadvantages.
If the file contains json data, would passing around as byte[] vs string have any advantages
Upvotes: 0
Views: 154
Reputation: 198324
No. JSON should be a String, since it has an encoding and a meaning. byte[]
is generally a physical, uninterpreted sequence of bytes; String
is a sequence of characters.
Upvotes: 1