dataIn.ready() is not a test of data source validity!
[jalview.git] / src / jalview / io / FileParse.java
index 4670d99..4714b8f 100755 (executable)
@@ -374,10 +374,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;
     }