String to Byte Array conversion Logic and vice versa Byte Array to String in Java. When i came across such a situation to covert my String to Byte Array i tough it will be a complex logic.. But Java Libraries gives me a easy one line step that ease my job.
public byte[] stringToByte(String s) {
return s.getBytes();
}
People also Visited
public byte[] stringToByte(String s) {
return s.getBytes();
}
public String byteToString(byte[] b) {
return new String(b);
}
No comments:
Post a Comment
Post a Comment
Note: Only a member of this blog may post a comment.