首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

地图转byte

2012-09-01 
map转bytepublic static byte[] getSerializedBytes(MapString, Double list) {??if (null list || l

map转byte

public static byte[] getSerializedBytes(Map<String, Double> list) {
??if (null == list || list.size() < 0)
???return null;
??try {
???ByteArrayOutputStream bo = new ByteArrayOutputStream();
???ObjectOutputStream os = new ObjectOutputStream(bo);
???os.writeObject(list);
???return bo.toByteArray();
??} catch (IOException e) {
???return null;
??}
?}

热点排行