UncheckedIOException
6162636465666768
BlockStore cachingStore = new CachingBlockStore(new FileBackedBlockStore(cacheFile), IndexBlock.class, FreeListBlockStore.FreeListBlock.class); store = new StateCheckBlockStore(new FreeListBlockStore(cachingStore, maxFreeListEntries)); try { open(); } catch (Exception e) { throw new UncheckedIOException(String.format("Could not open %s.", this), e); } }
120121122123124125126127
} catch (CorruptedCacheException e) { rebuild(); return null; } } catch (Exception e) { throw new UncheckedIOException(String.format("Could not read entry '%s' from %s.", key, this), e); } }
144145146147148149150151
store.write(block); lookup.indexBlock.put(hashCode, block.getPos()); } store.flush(); } catch (Exception e) { throw new UncheckedIOException(String.format("Could not add entry '%s' to %s.", key, this), e); } }
159160161162163164165166
lookup.indexBlock.remove(lookup.entry); DataBlock block = store.read(lookup.entry.dataBlock, DataBlock.class); store.remove(block); store.flush(); } catch (Exception e) { throw new UncheckedIOException(String.format("Could not remove entry '%s' from %s.", key, this), e); } }
176177178179180181182183
public void reset() { close(); try { open(); } catch (Exception e) { throw new UncheckedIOException(e); } }
184185186187188189190191
public void close() { try { store.close(); } catch (Exception e) { throw new UncheckedIOException(e); } }
203204205206207208209210211
public void verify() { try { doVerify(); } catch (Exception e) { throw new UncheckedIOException(String.format("Some problems were found when checking the integrity of %s.", this), e); } }
114115116117118119120121122123124
private File createTmpDir() { File tmpFile; try { tmpFile = File.createTempFile("gradle_ivy_cache_" + getName(), ""); } catch (IOException e) { throw new UncheckedIOException(e); } tmpFile.delete(); tmpFile.mkdir(); DeleteOnExit.addFile(tmpFile); return tmpFile;
53545556575859606162
Set<URL> urls = new LinkedHashSet<URL>(); for (File file : classPathFiles) { try { urls.add(file.toURI().toURL()); } catch (MalformedURLException e) { throw new UncheckedIOException(e); } } return urls; }
65666768697071727374
List<URL> urls = new ArrayList<URL>(files.size()); for (File file : files) { try { urls.add(file.toURI().toURL()); } catch (MalformedURLException e) { throw new UncheckedIOException(e); } } return urls.toArray(new URL[urls.size()]); }