Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Super Contributor
lyon819
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
Accepted Solution

How to convert a single byte to String??

Purpose:

Show a byte result on the screen of BB 9900.

 

Question:

How to convert a single byte to String??

 

Part of code:

byte value  = con.cpu_config.elementAt(i)

//stop here

String valuestring = new String(value);

_rtf.setText(valuestring);

 

If you know how to solve it, please share your idea.

 

Thanks your attention,

 

 

 

-Fight with BB10
Super Contributor
lyon819
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.

Re: How to convert a single byte to String??

String valuestring = new String(new byte [] {value}};

_data.append(valuestring);

_rtf.setText(_data.toSrting());

 

Solve it.

 

 

-Fight with BB10