I have already close this ,why it still has bug?jdk1.6 how to solve
(upload://55wcYaYER52THdvsrRgXNv92Hcm.jpeg)
private static void unGzip(String src, File target) throws Exception {
FileInputStream is = null;
FileOutputStream os = null;
GZIPInputStream gis = null;
int len;
byte[] buffer = new byte[1024];
try {
is = new FileInputStream(new String(src.getBytes(),
"UTF-8"));
os = new FileOutputStream(target);
gis = new GZIPInputStream(is);
while ((len = gis.read(buffer, 0, buffer.length)) != -1) {
os.write(buffer, 0, len);
}
} catch (Exception e) {
log.error(e.getMessage());
} finally {
if(os != null){
os.flush();
}
if(gis != null){
try {
gis.close();
} catch (IOException e) {
log.error("inputStream close IOException:"+e.getMessage());
}
}
if(os != null){
try {
os.close();
} catch (IOException e) {
log.error("inputStream close IOException:"+e.getMessage());
}
}
if(is != null){
try {
is.close();
} catch (IOException e) {
log.error("inputStream close IOException:"+e.getMessage());
}
}
}