src/jdk.packager/share/classes/jdk/packager/internal/IOUtils.java
branchJDK-8200758-branch
changeset 56982 e094d5483bd6
parent 56869 41e17fe9fbeb
child 56989 0f19096663d1
--- a/src/jdk.packager/share/classes/jdk/packager/internal/IOUtils.java	Fri Oct 12 19:00:51 2018 -0400
+++ b/src/jdk.packager/share/classes/jdk/packager/internal/IOUtils.java	Wed Oct 17 13:50:11 2018 -0400
@@ -37,7 +37,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-
 public class IOUtils {
 
     public static void deleteRecursive(File path) throws IOException {
@@ -166,7 +165,7 @@
         return foldersize;
     }
 
-    //run "launcher paramfile" in the directory where paramfile is kept
+    // run "launcher paramfile" in the directory where paramfile is kept
     public static void run(String launcher, File paramFile, boolean verbose)
             throws IOException {
         if (paramFile != null && paramFile.exists()) {
@@ -287,39 +286,4 @@
 
         return ret;
     }
-
-    // no good test if we are running pre-JRE7
-    // use heuristic approach
-    // "false positive" is better than wrong answer
-    public static boolean isNotSymbolicLink(File file) {
-        //no symlinks on windows
-        if (Platform.getPlatform() == Platform.WINDOWS) {
-            return true;
-        }
-        try {
-            if (file == null || file.getParent() == null) {
-                return false;
-            }
-            File file_canonical = new File(
-                    file.getParentFile().getCanonicalFile(), file.getName());
-            if (file_canonical.getCanonicalFile().equals(
-                       file_canonical.getAbsoluteFile())) {
-                return true;
-            }
-        } catch (IOException ioe) {}
-        return false;
-    }
-
-    public static byte[] readFully(File f) throws IOException {
-        InputStream inp = new FileInputStream(f);
-        // read fully into memory
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        byte[] buffer = new byte[1024];
-        int length;
-        while ((length = inp.read(buffer)) != -1) {
-            baos.write(buffer, 0, length);
-        }
-        baos.close();
-        return baos.toByteArray();
-    }
 }