X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FFileParse.java;h=051550798cd519fd9fa2a13e35b6946544bc553f;hb=f7c96b0eada06e354b66a186f272aeb3ff872a90;hp=db4af46bd8a914fc21f9e63c3b119cba9f4414af;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index db4af46..0515507 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) * Copyright (C) 2010 J Procter, AM Waterhouse, 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; }