Code example for File

Methods: renameTo

    private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
        if (deleteDestination) {
        if (!from.renameTo(to)) {
            throw new IOException();
     * Returns a snapshot of the entry named {@code key}, or null if it doesn't 
     * exist is not currently readable. If a value is returned, it is moved to 
     * the head of the LRU queue. 
    public synchronized Snapshot get(String key) throws IOException {
        Entry entry = lruEntries.get(key);
        if (entry == null) {
Stop searching for code, let great code find you!  Add Codota to your java IDE