Dave’s Brain
Home
Search
Browse
Recent
Keywords
Other sites
Feedback
Sign in
Random
Crawlers
Programming Tips
- Java: Convert a byte array to/from a String?
Date:
2012feb10
Language:
Java
Level:
beginner
Q.
Java: Convert a byte array to/from a String?
A.
Converting a String to a byte array:
byte
[]
mybytes
=
mystring
.
getBytes
()
Converting a byte array to a String:
String
mystring
=
new
String
(
mybytes
);