色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

map如何轉(zhuǎn)成byte數(shù)組

林子帆2年前13瀏覽0評論

map如何轉(zhuǎn)成byte數(shù)組?

把Map轉(zhuǎn)換成byte數(shù)組,使用 byteArrayOutputStream 和 ObjectOutputStream

ByteArrayOutputStream stream = new ByteArrayOutputStream();

bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);

byte[] byteArray = stream.toByteArray();

public static byte[] getSerializedBytes(Map<String, Double> list) {undefined

if (null == list || list.size() < 0)

return null;

try {undefined

ByteArrayOutputStream bo = new ByteArrayOutputStream();

ObjectOutputStream os = new ObjectOutputStream(bo);

os.writeObject(list);

return bo.toByteArray();

} catch (IOException e) {undefined

return null;

java數(shù)組get(),map如何轉(zhuǎn)成byte數(shù)組