replacing @j2sNative with @j2sIgnore where appropriate - requires NEW
[jalview.git] / src / jalview / util / Platform.java
index 68985b5..c0c8966 100644 (file)
@@ -521,10 +521,10 @@ public class Platform
   public static void streamToFile(InputStream is, File outFile)
           throws IOException
   {
-    if (!isJS() || /**
-                    * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) ||
-                    */
-            false)
+    if (isJS() && /**
+                   * @j2sNative outFile.setBytes$O && outFile.setBytes$O(is) &&
+                   */
+            true)
     {
       return;
     }
@@ -543,4 +543,29 @@ public class Platform
     }
   }
 
+  /**
+   * Add a known domain that implements access-control-allow-origin:*
+   * 
+   * These should be reviewed periodically.
+   * 
+   * @param domain
+   *          for a service that is not allowing ajax
+   * 
+   * @author hansonr@stolaf.edu
+   * 
+   */
+  public static void addJ2SDirectDatabaseCall(String domain)
+  {
+
+    System.out.println(
+            "Platform adding no-access-control-allow-origin domain "
+                    + domain);
+
+    /**
+     * @j2sNative
+     * 
+     *            J2S.addDirectDatabaseCall(domain);
+     */
+  }
+
 }