JAL-1919 code improvement to make PDB sequence fetcher file format configurable....
[jalview.git] / src / jalview / ws / ebi / EBIFetchClient.java
index a785899..468b7f0 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.ws.ebi;
 
+import jalview.util.MessageManager;
+
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.File;
@@ -31,8 +33,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
 
-import jalview.util.MessageManager;
-
 /**
  * DOCUMENT ME!
  * 
@@ -97,13 +97,13 @@ public class EBIFetchClient
    * @return the file holding the response
    * @throws OutOfMemoryError
    */
-  public File fetchDataAsFile(String ids, String f, String s)
+  public File fetchDataAsFile(String ids, String f, String s, String ext)
           throws OutOfMemoryError
   {
     File outFile = null;
     try
     {
-      outFile = File.createTempFile("jalview", ".xml");
+      outFile = File.createTempFile("jalview", ext);
       outFile.deleteOnExit();
       fetchData(ids, f, s, outFile);
       if (outFile.length() == 0)