X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileParse.java;fp=src%2Fjalview%2Fio%2FFileParse.java;h=71640f4bfdf45c92d8d0c7a9a86f0ca52c625459;hb=9623cea766a766683243235557ad48e6f7659e6a;hp=22213122bd40ac32ae525a526eca28b4082d05a8;hpb=6066400ed6b0fe288ebbea82389f59838a534706;p=jalview.git diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index 2221312..71640f4 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -80,7 +80,7 @@ public class FileParse public void setNewlineString(String nl) { - newline = nl; + newline = nl; } public String getNewlineString() @@ -98,7 +98,7 @@ public class FileParse protected BufferedReader dataIn = null; - protected String errormessage = "UNITIALISED SOURCE"; + protected String errormessage = "UNINITIALISED SOURCE"; protected boolean error = true; @@ -124,7 +124,9 @@ public class FileParse { if (from == null) { - throw new Error(MessageManager.getString("error.implementation_error_null_fileparse")); + throw new Error( + MessageManager + .getString("error.implementation_error_null_fileparse")); } if (from == this) { @@ -239,7 +241,10 @@ public class FileParse { if (e != null) { - throw new IOException(MessageManager.getString("exception.failed_to_resolve_gzip_stream"), e); + throw new IOException( + MessageManager + .getString("exception.failed_to_resolve_gzip_stream"), + e); } throw q; } @@ -318,12 +323,17 @@ public class FileParse { if (checkFileSource(suffixLess)) { - throw new IOException(MessageManager.formatMessage("exception.problem_opening_file_also_tried", new String[]{inFile.getName(),suffixLess,errormessage})); + throw new IOException(MessageManager.formatMessage( + "exception.problem_opening_file_also_tried", + new String[] { inFile.getName(), suffixLess, + errormessage })); } } else { - throw new IOException(MessageManager.formatMessage("exception.problem_opening_file", new String[]{inFile.getName(),errormessage})); + throw new IOException(MessageManager.formatMessage( + "exception.problem_opening_file", + new String[] { inFile.getName(), errormessage })); } } } @@ -335,7 +345,7 @@ public class FileParse { checkURLSource(fileStr); if (suffixSeparator == '#') - { + { extractSuffix(fileStr); // URL lref is stored for later reference. } } catch (IOException e) @@ -402,7 +412,9 @@ public class FileParse if (dataIn == null || error) { // pass up the reason why we have no source to read from - throw new IOException(MessageManager.formatMessage("exception.failed_to_read_data_from_source", new String[]{errormessage})); + throw new IOException(MessageManager.formatMessage( + "exception.failed_to_read_data_from_source", + new String[] { errormessage })); } error = false; dataIn.mark(READAHEAD_LIMIT); @@ -422,7 +434,8 @@ public class FileParse } else { - throw new IOException(MessageManager.getString("exception.no_init_source_stream")); + throw new IOException( + MessageManager.getString("exception.no_init_source_stream")); } } @@ -432,7 +445,9 @@ public class FileParse { return dataIn.readLine(); } - throw new IOException(MessageManager.formatMessage("exception.invalid_source_stream", new String[]{errormessage})); + throw new IOException(MessageManager.formatMessage( + "exception.invalid_source_stream", + new String[] { errormessage })); } /** @@ -477,7 +492,9 @@ public class FileParse } else { - throw new IOException(MessageManager.getString("error.implementation_error_reset_called_for_invalid_source")); + throw new IOException( + MessageManager + .getString("error.implementation_error_reset_called_for_invalid_source")); } } @@ -582,7 +599,8 @@ public class FileParse */ public void configureForView(AlignmentViewPanel avpanel) { - if (avpanel!=null) { + if (avpanel != null) + { setViewport(avpanel.getAlignViewport()); } // could also set export/import settings