/*
- * 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.
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());
return null;
}
+ public static String checkProtocol(String file)
+ {
+ String protocol = FILE;
+
+ if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1)
+ {
+ protocol = URL;
+ }
+ return protocol;
+ }
+
public static void main(String[] args)
{
int i = 0;
if (!fp.isValid())
{
fp = null;
- } else {
- if (debug)
+ }
+ else
{
- System.out.println("Successful.");
- }}
+ if (debug)
+ {
+ System.out.println("Successful.");
+ }
+ }
} catch (Exception e)
{
if (debug)
}
return null;
}
-}
\ No newline at end of file
+}