j2sNative references moved to Platform
[jalview.git] / src / jalview / io / FileParse.java
index 809bc8f..80b6836 100755 (executable)
@@ -25,6 +25,7 @@ import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.api.FeatureSettingsModelI;
 import jalview.util.MessageManager;
+import jalview.util.Platform;
 
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
@@ -333,12 +334,7 @@ public class FileParse
   private void parse(File file, String fileStr, DataSourceType sourceType,
           boolean isFileObject) throws MalformedURLException, IOException
   {
-    /**
-     * @j2sNative
-     * 
-     *            this.bytes = file && file._bytes;
-     * 
-     */
+       bytes = Platform.getFileBytes(file);
     this.dataSourceType = sourceType;
     error = false;
 
@@ -375,15 +371,7 @@ public class FileParse
     }
     else if (sourceType == DataSourceType.RELATIVE_URL)
     {
-      /**
-       * BH 2018 hack for no support for access-origin
-       * 
-       * @j2sNative
-       * 
-       * this.bytes = swingjs.JSUtil.getFileAsBytes$O(fileStr);
-       * 
-       */
-
+      bytes = Platform.getFileAsBytes(fileStr);
       dataIn = new BufferedReader(new java.io.InputStreamReader(new ByteArrayInputStream(bytes)));      
       dataName = fileStr;