+ String seprator = System.getProperty("file.separator");
+ String jvTempDir = System.getProperty("java.io.tmpdir") + "jalview"
+ + seprator + System.currentTimeMillis();
+ File tempStructFile = new File(
+ jvTempDir + seprator + fileName + "." + extension);
+ tempStructFile.mkdirs();
+ return tempStructFile.toString();
+ }
+
+ /**
+ *
+ * @param file a File, or a String which is a name of a file
+ * @return
+ * @throws FileNotFoundException
+ */
+ @SuppressWarnings("unused")
+ public static BufferedReader getBuffereReader(Object file) throws FileNotFoundException {
+ if (file instanceof String)
+ return new BufferedReader(new FileReader((String) file));
+
+ byte[] bytes = /** @j2sNative file._bytes || */ null;
+ if (bytes != null)
+ return new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes)));
+ return new BufferedReader(new FileReader((File) file));