• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

byte or char into String?

 
Marko Debac
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there posibility that I create put all this what are getting out with System.out.print((char)buf[i]) into one little String?


What is the good(best) way to transform?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you consider using a StringBuffer ?
 
Bupjae Lee
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 3 options; each option has diffrerent result.

1) If you want to make 1-length String:


2) If you want to make maxinum-1024-length String block:


3) If you want to make whole result to one String:
 
Marko Debac
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys
Marko
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic