这个是因为byte[]转换成String时会遇到大量根本不可以显示的字符,这样就是错误的原由你可以使用
String result = new sun.misc.BASE64Encoder().encode(buf);这样可以完成避免上述问题
byte[] buf2 = new sun.misc.BASE64Decoder().encodeBuffer(result);

解决方案 »

  1.   

    纠正楼上的一个错误:    //处理2
        //byte[]<->String<->byte[]
        String b = new sun.misc.BASE64Encoder().encode(testbyte1);
        byte[] testbyte3 = new sun.misc.BASE64Decoder().decodeBuffer(b);
                                                        ~~~~~~~~~~~~
        testbyte2 = unzip(testbyte3);
    这样可以.
      

  2.   

    请FTP高手看看这个贴,谢谢
    http://community.csdn.net/Expert/topic/3907/3907236.xml?temp=.7387812