• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unicode with byte streams?  RSS feed

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody, can I read a file containing Unicode data using byte streams?

Thank you all in advance.
 
Paul Clapham
Sheriff
Posts: 22817
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course you can. You can read any file whatsoever using a byte stream.

However you didn't say what you wanted to do with the data you read. If you just wanted to copy it to somewhere else, then just copying the bytes would be the best approach. But if you wanted to interpret the data as Unicode characters and do something with those characters, then using a character stream to read the data would be the best approach.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Paul. Actually I am reading about I/O streams at sun's site. So many doubts are raising in my mind.

Thanks for the reply. Have a good day. :thumbup:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!