diff options
author | netconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-12-17 15:43:39 +0000 |
---|---|---|
committer | netconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-12-17 15:43:39 +0000 |
commit | 9ef042419014ebe9ea3e6ce0af5568de2d933c7d (patch) | |
tree | a8284072aac2839b4d6ea0b1d39c4f82a93e5fb1 /src/main/java/at/gv/egiz/pdfas/web/helper | |
parent | cd02a128515400fdb97c276e70631d5bdb5ff509 (diff) | |
download | pdf-as-3-9ef042419014ebe9ea3e6ce0af5568de2d933c7d.tar.gz pdf-as-3-9ef042419014ebe9ea3e6ce0af5568de2d933c7d.tar.bz2 pdf-as-3-9ef042419014ebe9ea3e6ce0af5568de2d933c7d.zip |
Change Request "Document Correction"
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@239 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/web/helper')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java index 3775776..1b7971c 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/helper/TempDirHelper.java @@ -137,7 +137,7 @@ public class TempDirHelper return pdfDataSource;
}
- protected static File placeInputIntoTempDirFile(InputStream input, String fileNameSuffix) throws IOException
+ public static File placeInputIntoTempDirFile(InputStream input, String fileNameSuffix) throws IOException
{
String fileName = formatFileName(fileNameSuffix);
@@ -156,6 +156,23 @@ public class TempDirHelper return tmpFile;
}
+
+ public static File formTempFile(String fileNameSuffix)
+ {
+ String fileName = formatFileName(fileNameSuffix);
+ File tmpFile = getFileInTempDir(fileName);
+
+ return tmpFile;
+ }
+
+ protected static File getFileInTempDir (String fileName)
+ {
+ File tempDir = new File(new File(SettingsReader.RESOURCES_PATH), "pdfastmp");
+
+ File tmpFile = new File(tempDir, fileName);
+
+ return tmpFile;
+ }
protected static String formatFileName(String fileNameSuffix)
{
@@ -176,9 +193,7 @@ public class TempDirHelper protected static File createTempFileInDir(String fileName) throws IOException
{
- File tempDir = new File(new File(SettingsReader.RESOURCES_PATH), "pdfastmp");
-
- File tmpFile = new File(tempDir, fileName);
+ File tmpFile = getFileInTempDir(fileName);
tmpFile.createNewFile();
|