java - Change Data inside byte array Without corrupting byte array -


����sr��java.util.vectorٗ}[�;���i��capacityincrementi��elementcount[��elementdatat��[ljava/lang/object;xp��������������ur��[ljava.lang.object;��x�s)l����xp������t��918983123456@s.whatsapp.nett��91704056789@s.whatsapp.netx 

i have 1 byte[] , inside byte[] have above data. want change mobile numbers byte[] array. without corrupting byte array data.

i tried, first create string byte array new string(byte[]), after replace mobile number after again created byte array replace string using getbytes() after print new byte array showing data replacing new mobile number byte array corrupted.

guyz, please me & thankx in advance.

you need initialize new string(bytes[] b) proper encoding second argument.

for instance:

string foo = new string(mybytesarray, "utf-8"); 

same applies getbytes method. instance:

byte[] mybytearray = "foo".getbytes("utf-8"); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -