Create methods for creating temp files 51/123851/2
authorJim Hahn <jrh3@att.com>
Thu, 2 Sep 2021 16:18:49 +0000 (12:18 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 2 Sep 2021 21:55:50 +0000 (17:55 -0400)
commit3495931d999bd8022724c6fea0166baf01b5e113
treec0385152a6f3c23d3b84824123cce6cf36ccff6b
parent32ab41fa6a6998ff88cd9dbef31f7c65f39ee0e1
Create methods for creating temp files

Created utility methods to create temp files and set default
permissions.  These can be used in other repos to satisfy sonar.
Also added code to close streams and clean up temp files created
by some junit tests.
Modified to use IOUtils to read a stream.

Issue-ID: POLICY-3289
Change-Id: Ic83e4f4d7745be7b37ebb42bf1d81e303d8dadc9
Signed-off-by: Jim Hahn <jrh3@att.com>
utils/src/main/java/org/onap/policy/common/utils/resources/DirectoryUtils.java [new file with mode: 0644]
utils/src/main/java/org/onap/policy/common/utils/resources/ResourceUtils.java
utils/src/main/java/org/onap/policy/common/utils/resources/TextFileUtils.java
utils/src/test/java/org/onap/policy/common/utils/resources/DirectoryUtilsTest.java [new file with mode: 0644]
utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java
utils/src/test/java/org/onap/policy/common/utils/resources/TextFileUtilsTest.java