Examples of UncheckedIOException


Examples of java.io.UncheckedIOException

    private static Runnable asUncheckedRunnable(Closeable c) {
        return () -> {
            try {
                c.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        };
    }
View Full Code Here

Examples of joshua.util.io.UncheckedIOException

          public void coNext(String hypStr) {
            try {
              writer.write(hypStr);
              writer.write("\n");
            } catch (IOException e) {
              throw new UncheckedIOException(e);
            }
          }
         
          public void finish() {
          }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

        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);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

            } catch (CorruptedCacheException e) {
                rebuild();
                return null;
            }
        } catch (Exception e) {
            throw new UncheckedIOException(String.format("Could not read entry '%s' from %s.", key, this), e);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

                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);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

            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);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

    public void reset() {
        close();
        try {
            open();
        } catch (Exception e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

    public void close() {
        try {
            store.close();
        } catch (Exception e) {
            throw new UncheckedIOException(e);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

    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);
        }
    }
View Full Code Here

Examples of org.gradle.api.UncheckedIOException

    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;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.