X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileParse.java;h=051550798cd519fd9fa2a13e35b6946544bc553f;hb=d99d6a98cd0a7009e94ca4166f48741af75cde1e;hp=9f87c3aa100a79aff44dfad18fdbdbc5afa191c5;hpb=c1635edb19af0853203e48f39379ad33259b40d3;p=jalview.git diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index 9f87c3a..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 @@ -383,9 +394,14 @@ public class FileParse } - 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; }