ensure mark is set before identification is started.
[jalview.git] / src / jalview / io / IdentifyFile.java
index 86b04a8..46899da 100755 (executable)
@@ -72,6 +72,10 @@ public class IdentifyFile
     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();