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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Trusted Contributor
lyon819
Posts: 248
Registered: ‎08-19-2010
My Carrier: TT
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
Please use plain text.
Trusted Contributor
lyon819
Posts: 248
Registered: ‎08-19-2010
My Carrier: TT

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
Please use plain text.