byte to string in Java

Ne kadar kolaymış yaa

byte[] buffer = readSomeNMEALine();
String line = new String(buffer);

veya

StringBuffer buff = new StringBuffer ()
while ( (ch = in.read()) != ‘\n’) {
 buff.append((char)ch);
}
String line = buff.toString();

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>