@Override @Test public void testPutFileExists() throws Exception { FsWorker worker = createWorker(); String[] testFiles = createTestFiles(); worker.put(DATA.getBytes(), new File(baseDir, testFiles[0])); byte[] readBytes = worker.get(new File(baseDir, testFiles[0])); assertEquals(DATA, new String(readBytes)); }
@Override public void put(byte[] data, File file) throws FsException { Args.notNull(file, "file"); if (file.exists() && !file.delete()) { throw new FsException("Could not delete [" + file + "]"); } super.put(data, file); }
OverwriteIfExistsWorker extends NioWorker { @Override public void put(byte[] data, File file) throws FsException { Args.notNull(file, "file"); if (file.exists() && !file.delete()) { throw new FsException("Could not delete [" + file + "]"); } super.put(data, file); } }
OverwriteIfExistsWorker extends NioWorker { @Override public void put(byte[] data, File file) throws FsException { Args.notNull(file, "file"); if (file.exists() && !file.delete()) { throw new FsException("Could not delete [" + file + "]"); } super.put(data, file); }  }
OverwriteIfExistsWorker extends NioWorker { @Override public void put(byte[] data, File file) throws FsException { Args.notNull(file, "file"); if (file.exists() && !file.delete()) { throw new FsException("Could not delete [" + file + "]"); } super.put(data, file); }  @Override void put(byte[] data, File file); }
OverwriteIfExistsWorker extends NioWorker { @Override public void put(byte[] data, File file) throws FsException { Args.notNull(file, "file"); if (file.exists() && !file.delete()) { throw new FsException("Could not delete [" + file + "]"); } super.put(data, file); }  @Override void put(byte[] data, File file);  }