update author list in license for (JAL-826)
[jalview.git] / src / jalview / io / FileParse.java
index 4670d99..05a7212 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
@@ -38,7 +38,18 @@ public class FileParse
   // same data source
 
   protected char suffixSeparator = '#';
-
+  /**
+   * character used to write newlines 
+   */
+  protected String newline = System.getProperty("line.separator");
+  public void setNewlineString(String nl)
+  {
+    newline = nl;
+  }
+  public String getNewlineString()
+  {
+    return newline;
+  }
   /**
    * '#' separated string tagged on to end of filename or url that was clipped
    * off to resolve to valid filename
@@ -374,10 +385,23 @@ public class FileParse
   {
     return dataName;
   }
+  /**
+   * set the (human readable) name or URI for this datasource
+   * @param dataname
+   */
+  protected void setDataName(String dataname) {
+    dataName = dataname;
+  }
+  
 
-  public Reader getReader() throws IOException
+  /**
+   * get the underlying bufferedReader for this data source.
+   * @return null if no reader available
+   * @throws IOException
+   */
+  public Reader getReader()
   {
-    if (dataIn != null && dataIn.ready())
+    if (dataIn != null) // Probably don't need to test for readiness && dataIn.ready())
     {
       return dataIn;
     }