日期:2014-05-20 浏览次数:20999 次
FileOutputStream fos = null;
DataOutputStream dos = null;
try
{
fos = new FileOutputStream(file);
dos = new DataOutputStream(fos);
dos.writeUTF(time);
dos.write(PicUtil.bitmapToBytes(pic));
}
catch (IOException e)
{
e.printStackTrace();
}
00 03 aa bb cc 01 03 12 32 34 ....
00 03 头两位表示数据长度,aa bb cc表示数据
01 03 表示图片长度, 01 03 12 32 34 ....表示图片数据