View Javadoc

1   package fr.in2p3.jsaga.impl.job.streaming;
2   
3   import java.io.File;
4   
5   /* ***************************************************
6   * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
7   * ***             http://cc.in2p3.fr/             ***
8   * ***************************************************
9   * File:   LocalFileFactory
10  * Author: Lionel Schwarz (lionel.schwarz@in2p3.fr)
11  * Date:   7 avril 2011
12  * ***************************************************
13  * Description:                                      */
14  
15  
16  public class LocalFileFactory {
17  
18  	public static File getLocalFile(String uniqId, String suffix) {
19  		return new File(System.getProperty("java.io.tmpdir"), "local-" + uniqId + "." + suffix);
20  	}
21  	public static File getLocalInputFile(String uniqId) {
22  		return getLocalFile(uniqId, "input");
23  	}
24  	public static File getLocalOutputFile(String uniqId) {
25  		return getLocalFile(uniqId, "output");
26  	}
27  	public static File getLocalErrorFile(String uniqId) {
28  		return getLocalFile(uniqId, "error");
29  	}
30  }