package jalview.ws.dbsources; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import com.stevesoft.pat.Regex; import jalview.datamodel.AlignmentI; import jalview.ws.DbSourceProxyImpl; public abstract class EbiFileRetrievedProxy extends DbSourceProxyImpl { /** * temp path to retrieved file */ protected String file = null; public StringBuffer getRawRecords() { if (file==null) return null; StringBuffer bf=null; try { File f = new File(file); if (f.exists()) { bf = new StringBuffer(); BufferedReader breader = new BufferedReader(new FileReader(f)); String line=null; while (breader.ready() && (line = breader.readLine())!=null) { bf.append(line); } breader.close(); } } catch (Exception e) { System.err.println("Warning: problens reading temp file "+file); return null; } return bf; } }