AlignFile afile = null;
String inFile;
-
+ /**
+ * character used to write newlines
+ */
+ protected String newline = System.getProperty("line.separator");
+ public void setNewlineString(String nl)
+ {
+ newline = nl;
+ }
+ public String getNewlineString()
+ {
+ return newline;
+ }
/**
* check that this format is valid for reading
*
throw new Exception(
"Implementation error: Unknown file format string");
}
-
+ afile.setNewlineString(newline);
afile.addJVSuffix(jvsuffix);
afile.setSeqs(alignment.getSequencesArray());
public static String checkProtocol(String file)
{
String protocol = FILE;
-
- if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1)
+ String ft = file.toLowerCase().trim();
+ if (ft.indexOf("http:") ==0 || ft.indexOf("https:") ==0 || ft.indexOf("file:") == 0)
{
protocol = URL;
}