List of usage examples for java.io File separator
String separator
To view the source code for java.io File separator.
Click Source Link
From source file:Main.java
private static String getTableDataFolder(String appName) { String path = getDataFolder(appName) + File.separator + TABLES_FOLDER_NAME; return path; }
From source file:Main.java
public static String getAssetsFolder(String appName) { String path = getConfigFolder(appName) + File.separator + ASSETS_FOLDER_NAME; return path; }
From source file:Main.java
public static String getAppCacheFolder(String appName) { String path = getDataFolder(appName) + File.separator + APP_CACHE_FOLDER_NAME; return path; }
From source file:Main.java
public static String getGeoCacheFolder(String appName) { String path = getDataFolder(appName) + File.separator + GEO_CACHE_FOLDER_NAME; return path; }
From source file:com.tinydream.scribeproxy.utils.Config.java
synchronized private static void init() { String path = System.getProperty("appconfig"); String pathFile = path + File.separator + "application.ini"; // System.out.println("pathFile:" + pathFile); // init configuration config = new CompositeConfiguration(); _hashConfig = new ConcurrentHashMap<String, String>(); try {/* ww w . j a va2 s . c o m*/ config.addConfiguration(new HierarchicalINIConfiguration(pathFile)); } catch (ConfigurationException ex) { logger_.error("Can't load configuration file", ex); System.err.println("Bad configuration; unable to start server"); System.exit(1); } }
From source file:Main.java
public static String getLoggingFolder(String appName) { String path = getOutputFolder(appName) + File.separator + LOGGING_FOLDER_NAME; return path; }
From source file:Main.java
public static String getWebDbFolder(String appName) { String path = getMetadataFolder(appName) + File.separator + WEB_DB_FOLDER_NAME; return path; }
From source file:uploadProcess.java
public static boolean encrypt(String path, FileItemStream item, String patientID) { try {/*from w w w . ja v a 2s . c om*/ File mainFolder = new File(path + File.separator + "Encrypt"); if (!mainFolder.exists()) { mainFolder.mkdir(); } File patientFolder = new File(mainFolder + File.separator + patientID); if (!patientFolder.exists()) { patientFolder.mkdir(); } String ukey = GetKey.getPatientKey(patientID); InputStream fis = item.openStream(); FileOutputStream fos = new FileOutputStream( patientFolder.getAbsolutePath() + File.separator + item.getName()); byte[] k = ukey.getBytes(); SecretKeySpec key = new SecretKeySpec(k, "AES"); System.out.println(key); Cipher enc = Cipher.getInstance("AES"); enc.init(Cipher.ENCRYPT_MODE, key); CipherOutputStream cos = new CipherOutputStream(fos, enc); byte[] buf = new byte[1024]; int read; while ((read = fis.read(buf)) != -1) { cos.write(buf, 0, read); } fis.close(); fos.flush(); cos.close(); //Upload File to cloud DropboxUpload upload = new DropboxUpload(); upload.uploadFile(patientFolder, item.getName(), StoragePath.getDropboxDir() + patientID); DeleteDirectory.delete(patientFolder); return true; } catch (Exception e) { System.out.println("Error: " + e); } return false; }
From source file:Main.java
public static String getAppCacheFolder(String appName) { String path = getMetadataFolder(appName) + File.separator + APP_CACHE_FOLDER_NAME; return path; }
From source file:Main.java
public static String getGeoCacheFolder(String appName) { String path = getMetadataFolder(appName) + File.separator + GEO_CACHE_FOLDER_NAME; return path; }