Merge "Remove use of deprecated Guava methods from testtool"
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / TestToolUtils.java
index b2c6ca0c319ba6f4973783cdb84e69ac8a231d11..6e474c5e9f1841eee245c988f8439a28b426748d 100644 (file)
@@ -8,19 +8,26 @@
 
 package org.opendaylight.netconf.test.tool;
 
-public class TestToolUtils {
+import java.io.InputStream;
+
+public final class TestToolUtils {
+    private TestToolUtils() {
+
+    }
 
     public static String getMac(long mac) {
         final StringBuilder builder = new StringBuilder(Long.toString(mac, 16));
-
         for (int i = builder.length(); i < 12; i++) {
             builder.insert(0, "0");
         }
-
         for (int j = builder.length() - 2; j >= 2; j -= 2) {
             builder.insert(j, ":");
         }
-
         return builder.toString();
     }
+
+    public static InputStream getDataAsStream(final String path) {
+        return TestToolUtils.class.getClassLoader().getResourceAsStream(path);
+    }
+
 }