*/
public String Identify(String file, String protocol)
{
+ String emessage = "UNIDENTIFIED FILE PARSING ERROR";
FileParse parser = null;
try {
parser = new FileParse(file, protocol);
} catch (Exception e) {
System.err.println("Error whilst identifying");
e.printStackTrace(System.err);
+ emessage = e.getMessage();
}
if (parser!=null)
return parser.errormessage;
- return "UNIDENTIFIED FILE PARSING ERROR";
+ return emessage;
}
public String Identify(FileParse source) {
return Identify(source, true); // preserves original behaviour prior to version 2.3
boolean lineswereskipped=false;
boolean isBinary = false; // true if length is non-zero and non-printable characters are encountered
try {
+ if (!closeSource)
+ {
+ source.mark();
+ }
while ( (data = source.nextLine()) != null)
{
length+=data.length();
else
{
reply = "FASTA";
+ // TODO : AMSA File is indicated if there is annotation in the FASTA file - but FASTA will automatically generate this at the mo.
}
}
break;