怎么实现zip压缩包转换为可传输的byte[]流
用如下的方法得到的str值是DOA,,求大神解答下!
try {
File file=new File("source/java/test/mms/mms.zip");
FileInputStream fis = new FileInputStream(file);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[2048];
int count = 0;
while ((count = fis.read(buffer)) >= 0) {
baos.write(buffer, 0, count);
}
String str = byte2HexStr(baos.toByteArray());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}