equal
deleted
inserted
replaced
1995 */ |
1995 */ |
1996 public static File createTempFile(String prefix, String suffix, |
1996 public static File createTempFile(String prefix, String suffix, |
1997 File directory) |
1997 File directory) |
1998 throws IOException |
1998 throws IOException |
1999 { |
1999 { |
2000 if (prefix.length() < 3) |
2000 if (prefix.length() < 3) { |
2001 throw new IllegalArgumentException("Prefix string too short"); |
2001 throw new IllegalArgumentException("Prefix string \"" + prefix + |
|
2002 "\" too short: length must be at least 3"); |
|
2003 } |
2002 if (suffix == null) |
2004 if (suffix == null) |
2003 suffix = ".tmp"; |
2005 suffix = ".tmp"; |
2004 |
2006 |
2005 File tmpdir = (directory != null) ? directory |
2007 File tmpdir = (directory != null) ? directory |
2006 : TempDirectory.location(); |
2008 : TempDirectory.location(); |