consolidation of Platform isJS calls
[jalview.git] / src / jalview / project / Jalview2XML.java
index fa104a6..41dd2f9 100644 (file)
@@ -214,21 +214,9 @@ public class Jalview2XML
   // BH 2018 we add the .jvp binary extension to J2S so that
   // it will declare that binary when we do the file save from the browser
 
-  private static void addJ2SBinaryType(String ext)
-  {
-    ext = "." + ext + "?";
-
-    /**
-     * @j2sNative
-     * 
-     *            J2S._binaryTypes.push(ext);
-     * 
-     */
-  }
-
   static
   {
-    addJ2SBinaryType(".jvp?");
+    Platform.addJ2SBinaryType(".jvp?");
   }
 
   private static final String VIEWER_PREFIX = "viewer_";
@@ -2791,8 +2779,7 @@ public class Jalview2XML
                // BH 2018 allow for bytes already attached to File object
                try {
                        String file = (ofile instanceof File ? ((File) ofile).getCanonicalPath() : ofile.toString());
-                       byte[] bytes = /** @j2sNative ofile._bytes || */
-                                       null;
+      byte[] bytes = Platform.getFileBytes((File) ofile);
                        URL url = null;
                        errorMessage = null;
                        uniqueSetSuffix = null;