X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileParse.java;h=051550798cd519fd9fa2a13e35b6946544bc553f;hb=5aad8085fbd06d2e0f6a97d71e8ed58d0e02e6db;hp=4670d998e3e1982dd51f5cb607cfc03421b4512b;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index 4670d99..0515507 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -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; }