JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / io / FileParse.java
index 9228257..4526eba 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -80,7 +80,7 @@ public class FileParse
 
   public void setNewlineString(String nl)
   {
-      newline = nl;
+    newline = nl;
   }
 
   public String getNewlineString()
@@ -98,7 +98,7 @@ public class FileParse
 
   protected BufferedReader dataIn = null;
 
-  protected String errormessage = "UNITIALISED SOURCE";
+  protected String errormessage = "UNINITIALISED SOURCE";
 
   protected boolean error = true;
 
@@ -124,7 +124,9 @@ public class FileParse
   {
     if (from == null)
     {
-      throw new Error(MessageManager.getString("error.implementation_error_null_fileparse"));
+      throw new Error(
+              MessageManager
+                      .getString("error.implementation_error_null_fileparse"));
     }
     if (from == this)
     {
@@ -239,7 +241,10 @@ public class FileParse
     {
       if (e != null)
       {
-        throw new IOException(MessageManager.getString("exception.failed_to_resolve_gzip_stream"), e);
+        throw new IOException(
+                MessageManager
+                        .getString("exception.failed_to_resolve_gzip_stream"),
+                e);
       }
       throw q;
     }
@@ -294,12 +299,17 @@ public class FileParse
         {
           if (checkFileSource(suffixLess))
           {
-            throw new IOException(MessageManager.formatMessage("exception.problem_opening_file_also_tried", new String[]{inFile.getName(),suffixLess,errormessage}));
+            throw new IOException(MessageManager.formatMessage(
+                    "exception.problem_opening_file_also_tried",
+                    new String[] { inFile.getName(), suffixLess,
+                        errormessage }));
           }
         }
         else
         {
-          throw new IOException(MessageManager.formatMessage("exception.problem_opening_file", new String[]{inFile.getName(),errormessage}));
+          throw new IOException(MessageManager.formatMessage(
+                  "exception.problem_opening_file",
+                  new String[] { inFile.getName(), errormessage }));
         }
       }
     }
@@ -311,7 +321,7 @@ public class FileParse
         {
           checkURLSource(fileStr);
           if (suffixSeparator == '#')
-           {
+          {
             extractSuffix(fileStr); // URL lref is stored for later reference.
           }
         } catch (IOException e)
@@ -378,7 +388,9 @@ public class FileParse
     if (dataIn == null || error)
     {
       // pass up the reason why we have no source to read from
-      throw new IOException(MessageManager.formatMessage("exception.failed_to_read_data_from_source", new String[]{errormessage}));
+      throw new IOException(MessageManager.formatMessage(
+              "exception.failed_to_read_data_from_source",
+              new String[] { errormessage }));
     }
     error = false;
     dataIn.mark(READAHEAD_LIMIT);
@@ -398,7 +410,8 @@ public class FileParse
     }
     else
     {
-      throw new IOException(MessageManager.getString("exception.no_init_source_stream"));
+      throw new IOException(
+              MessageManager.getString("exception.no_init_source_stream"));
     }
   }
 
@@ -408,7 +421,9 @@ public class FileParse
     {
       return dataIn.readLine();
     }
-    throw new IOException(MessageManager.formatMessage("exception.invalid_source_stream", new String[]{errormessage}));
+    throw new IOException(MessageManager.formatMessage(
+            "exception.invalid_source_stream",
+            new String[] { errormessage }));
   }
 
   /**
@@ -453,7 +468,9 @@ public class FileParse
     }
     else
     {
-      throw new IOException(MessageManager.getString("error.implementation_error_reset_called_for_invalid_source"));
+      throw new IOException(
+              MessageManager
+                      .getString("error.implementation_error_reset_called_for_invalid_source"));
     }
   }
 
@@ -558,7 +575,8 @@ public class FileParse
    */
   public void configureForView(AlignmentViewPanel avpanel)
   {
-    if (avpanel!=null) {
+    if (avpanel != null)
+    {
       setViewport(avpanel.getAlignViewport());
     }
     // could also set export/import settings