aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMurali Mohan Murthy Potham <murali.p@huawei.com>2018-03-08 09:25:53 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-08 09:25:53 +0000
commit361d18b77ec35332c9474f73fda7d376dc6ff0b0 (patch)
treea8ea1770825234590e418e4201e913aa6b6b7648
parent24a92f9ff065ee91c403b41e305ed6fb757f626f (diff)
parent37945bf2f9b95a4c24ccc6ba09c2132c406c8f7e (diff)
Merge "Improve code coverage"
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java61
1 files changed, 1 insertions, 60 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java
index a5ca6ac1..073bb3eb 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java
@@ -21,7 +21,6 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
@@ -48,7 +47,7 @@ public final class FileUtil {
private static final int TRY_COUNT = 3;
private FileUtil() {
- // Empty constructor
+ //Empty constructor
}
/**
@@ -139,64 +138,6 @@ public final class FileUtil {
return unzipFileNams;
}
- /**
- * close InputStream.
- *
- * @param inputStream
- * the inputstream to close
- */
- public static void closeInputStream(InputStream inputStream) {
- try {
- if (inputStream != null) {
- inputStream.close();
- }
- } catch (Exception e1) {
- logger.info("error while closing InputStream!", e1);
- }
- }
-
- /**
- * close OutputStream.
- *
- * @param outputStream
- * the output stream to close
- */
- public static void closeOutputStream(OutputStream outputStream) {
- try {
- if (outputStream != null) {
- outputStream.close();
- }
- } catch (Exception e1) {
- logger.info("error while closing OutputStream!", e1);
- }
- }
-
- public static void closeFileStream(FileInputStream ifs) {
- try {
- if (ifs != null) {
- ifs.close();
- }
- } catch (Exception e1) {
- logger.info("error while closing OutputStream", e1);
- }
- }
-
- /**
- * close zipFile.
- *
- * @param zipFile
- * the zipFile to close
- */
- public static void closeZipFile(ZipFile zipFile) {
- try {
- if (zipFile != null) {
- zipFile.close();
- }
- } catch (IOException e1) {
- logger.info("close ZipFile error!", e1);
- }
- }
-
public static boolean checkFileExists(String filePath) {
File file = new File(filePath);
return file.exists();