• Post Reply Bookmark Topic Watch Topic
  • New Topic

Create string from file  RSS feed

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to convert the file of any type to be the string format (in the processes of download/upload), how can I do that?

Thnx
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what you're trying to do. Is it like converting from let's say binary to text? I wonder if that's possible
 
Sheriff
Posts: 21137
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of string format? Just the plain text contents? That won't quite work with binary files*. Base64 encoding might be a better idea, it's what email uses most of the time for attachments. UUencoded might also work.


* Well it will probably work but the string will not be readable. It's not recommnended.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!