refactored to decouple dependencies due to FileParse's derived classes
[jalview.git] / src / jalview / io / AppletFormatAdapter.java
index ee24238..5eb4d2b 100755 (executable)
@@ -463,6 +463,17 @@ public class AppletFormatAdapter
     return null;
   }
 
+  public static String checkProtocol(String file)
+  {
+    String protocol = FILE;
+  
+    if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1)
+    {
+      protocol = URL;
+    }
+    return protocol;
+  }
+
   public static void main(String[] args)
   {
     int i = 0;
@@ -597,11 +608,14 @@ public class AppletFormatAdapter
       if (!fp.isValid())
       {
         fp = null;
-      } else {
-      if (debug)
+      }
+      else
       {
-        System.out.println("Successful.");
-      }}
+        if (debug)
+        {
+          System.out.println("Successful.");
+        }
+      }
     } catch (Exception e)
     {
       if (debug)