summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-28 19:56:28 (EDT)
committerEike Stepper2007-07-28 19:56:28 (EDT)
commit48f0451fcd344fb4de95c56a3754e430e73eb426 (patch)
tree832a76d001e8ee2fbb4eae27e94406ae0d973ed3
parentada3ee39047784b6b9d6e775bff977c8c421be48 (diff)
downloadcdo-48f0451fcd344fb4de95c56a3754e430e73eb426.zip
cdo-48f0451fcd344fb4de95c56a3754e430e73eb426.tar.gz
cdo-48f0451fcd344fb4de95c56a3754e430e73eb426.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/TMPUtil.java27
1 files changed, 17 insertions, 10 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/TMPUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/TMPUtil.java
index cc1d331..36041e9 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/TMPUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/TMPUtil.java
@@ -22,28 +22,35 @@ public final class TMPUtil
{
}
- public static File createTempFolder() throws IOException
+ public static File createTempFolder() throws IORuntimeException
{
return createTempFolder("tmp");
}
- public static File createTempFolder(String prefix) throws IOException
+ public static File createTempFolder(String prefix) throws IORuntimeException
{
return createTempFolder(prefix, "");
}
- public static File createTempFolder(String prefix, String suffix) throws IOException
+ public static File createTempFolder(String prefix, String suffix) throws IORuntimeException
{
return createTempFolder(prefix, suffix, null);
}
- public static File createTempFolder(String prefix, String suffix, File directory) throws IOException
+ public static File createTempFolder(String prefix, String suffix, File directory) throws IORuntimeException
{
- File tmp = File.createTempFile(prefix, suffix, directory);
- String tmpPath = tmp.getAbsolutePath();
- tmp.delete();
- tmp = new File(tmpPath);
- tmp.mkdirs();
- return tmp;
+ try
+ {
+ File tmp = File.createTempFile(prefix, suffix, directory);
+ String tmpPath = tmp.getAbsolutePath();
+ tmp.delete();
+ tmp = new File(tmpPath);
+ tmp.mkdirs();
+ return tmp;
+ }
+ catch (IOException ex)
+ {
+ throw new IORuntimeException(ex);
+ }
}
}