(String prefix, String suffix, File directory)
| 1305 | } |
| 1306 | |
| 1307 | private static File genTempFile(String prefix, String suffix, File directory) { |
| 1308 | int identify = 0; |
| 1309 | synchronized (tempFileLocker) { |
| 1310 | if (counter == 0) { |
| 1311 | int newInt = new Random().nextInt(); |
| 1312 | counter = ((newInt / 65535) & 0xFFFF) + 0x2710; |
| 1313 | counterBase = counter; |
| 1314 | } |
| 1315 | identify = counter++; |
| 1316 | } |
| 1317 | |
| 1318 | StringBuilder newName = new StringBuilder(); |
| 1319 | newName.append(prefix); |
| 1320 | newName.append(counterBase); |
| 1321 | newName.append(identify); |
| 1322 | newName.append(suffix); |
| 1323 | return new File(directory, newName.toString()); |
| 1324 | } |
| 1325 | |
| 1326 | /** |
| 1327 | * Returns a string representing the proper path for this file. If this file |
no test coverage detected