*/
     public static int unzipCSAR(String fileName, String filePath) {
         final int BUFFER = 2048;
-        int status = 0;
-        ZipFile zipFile = null;
-        try {
-            zipFile = new ZipFile(fileName);
+        int status = Constant.UNZIP_SUCCESS;
+
+        try(ZipFile zipFile = new ZipFile(fileName);) {
             Enumeration emu = zipFile.entries();
             while(emu.hasMoreElements()) {
                 ZipEntry entry = (ZipEntry)emu.nextElement();
                 if(parent != null && (!parent.exists())) {
                     parent.mkdirs();
                 }
-                try(FileOutputStream fos = new FileOutputStream(file)){
-                    try(BufferedOutputStream bos = new BufferedOutputStream(fos, BUFFER)){
-
+                try(FileOutputStream fos = new FileOutputStream(file);
+                    BufferedOutputStream bos = new BufferedOutputStream(fos, BUFFER);){
                     int count;
                     byte data[] = new byte[BUFFER];
                     while((count = bis.read(data, 0, BUFFER)) != -1) {
                         bos.write(data, 0, count);
                     }
                     bos.flush();
-                    }
                 }
             }
-
-            status = Constant.UNZIP_SUCCESS;
-
         } catch(Exception e) {
             status = Constant.UNZIP_FAIL;
             LOG.error("Exception: " + e);
-        } finally {
-            if(zipFile != null) {
-                try {
-                    zipFile.close();
-                } catch(IOException e) {
-                    LOG.error("IOException: " + e);
-                    ;
-                }
-            }
         }
         return status;
     }
 
         if(data == null) {
             return "";
         }
-        ByteArrayInputStream input = null;
-        GZIPInputStream gzis = null;
-        InputStreamReader reader = null;
         final StringBuilder out = new StringBuilder();
-        try {
-            input = new ByteArrayInputStream(data);
-            gzis = new GZIPInputStream(input);
-            reader = new InputStreamReader(gzis, Charset.forName(RestfulClientConst.ENCODING));
+        try (ByteArrayInputStream input = new ByteArrayInputStream(data);
+             GZIPInputStream gzis = new GZIPInputStream(input);
+             InputStreamReader reader = new InputStreamReader(gzis, Charset.forName(RestfulClientConst.ENCODING));) {
             final char[] buff = new char[1024];
             for(int n; (n = reader.read(buff)) != -1;) {
                 out.append(new String(buff, 0, n));
             }
-        } finally {
-            if(reader != null) {
-                try {
-                    reader.close();
-                } catch(final IOException e) {
-                    LOGGER.error("decompress Gzip reader exception:", e);
-                }
-            }
-            if(gzis != null) {
-                try {
-                    gzis.close();
-                } catch(final IOException e) {
-                    LOGGER.error("decompress Gzip exception:", e);
-                }
-            }
-            if(input != null) {
-                try {
-                    input.close();
-                } catch(final IOException e) {
-                    LOGGER.error("decompress Gzip input exception:", e);
-                }
-            }
         }
         return out.toString();
 
 
             LOG.error(filePath + "isn't exist.");
             return null;
         }
-        BufferedReader reader = null;
+
         final StringBuilder jsonstr = new StringBuilder();
         JSONObject jo = null;
-        try {
-            reader = new BufferedReader(new FileReader(file));
+        try (BufferedReader reader = new BufferedReader(new FileReader(file));) {
             final ReaderHelper rHelpper = new ReaderHelper(reader);
             String tempString = null;
             while((tempString = rHelpper.getLine()) != null) {
             jo = JSONObject.fromObject(jsonstr.toString());
         } catch(final IOException e) {
             LOG.error("load file exception:" + e);
-        } finally {
-            if(reader != null) {
-                try {
-                    reader.close();
-                } catch(final IOException e) {
-                    LOG.error("close error.", e);
-                }
-            }
         }
         return jo;
     }
 
 
     private static void writeVmIdsToFile(String vnfId, JSONArray vms) {
         String filePath = getVmIdsFilePath(vnfId);
-        FileOutputStream outStream = null;
         try {
             File destFile = FileUtils.getFile(filePath);
 
             if(!destFile.exists()) {
                 destFile.createNewFile();
             }
-            outStream = new FileOutputStream(destFile);
-            outStream.write(vms.toString().getBytes());
+            try(FileOutputStream outStream = new FileOutputStream(destFile)) {
+                outStream.write(vms.toString().getBytes());
+            }
         } catch(IOException e) {
             LOG.error("function=writeVmIdsToFile, msg=write vms to file ioexception, e : {}", e);
-        } finally {
-            IOUtils.closeQuietly(outStream);
         }
     }
 
     private static JSONArray readVmIdsFile(String vnfId) {
         String filePath = getVmIdsFilePath(vnfId);
-        InputStream ins = null;
-        BufferedInputStream bins = null;
-        String fileContent = "";
-        try {
-            ins = FileUtils.openInputStream(FileUtils.getFile(filePath));
-            bins = new BufferedInputStream(ins);
 
+        String fileContent = "";
+        try(InputStream ins = FileUtils.openInputStream(FileUtils.getFile(filePath));
+            BufferedInputStream bins = new BufferedInputStream(ins);) {
             byte[] contentByte = new byte[ins.available()];
             int num = bins.read(contentByte);
 
-
             if(num > 0) {
                 fileContent = new String(contentByte);
             }
             LOG.error("function=readVmIdsFile, msg=read vms from file IOException, filePath : {}", filePath);
         } catch(JSONException e) {
             LOG.error("function=readVmIdsFile, msg=read vms from file JSONException, fileContent : {}", fileContent);
-        } finally {
-            IOUtils.closeQuietly(bins);
-            IOUtils.closeQuietly(ins);
         }
         return new JSONArray();
     }