Reputation: 966
Can not we convert a string object to a byte object?
public bitmap a(String s){
byte[] b=(byte[])getValue(s);
...
}
getValue
returns a string object.
Upvotes: 0
Views: 746
Reputation: 32391
Use String.getBytes()
and its overloaded versions to transform a String
to byte[]
.
There are overloaded versions that allow you to specify the charset like UTF-8 for instance:
getBytes(String charsetName);
Upvotes: 4