@Test(expected = NullPointerException.class) public void testEcmStoreNullFails() { final InputStream stream = null; storage.save(stream); }
@Override public void save(final InputStream stream) { FileOutputStream fileOutput; try { fileOutput = new FileOutputStream(configFile); try { IOUtils.copy(stream, fileOutput); } finally { fileOutput.close(); } } catch (final IOException e) { throw new RuntimeException(e); } }
FileStorage implements Storage { @Override public void save(final InputStream stream) { FileOutputStream fileOutput; try { fileOutput = new FileOutputStream(configFile); try { IOUtils.copy(stream, fileOutput); } finally { fileOutput.close(); } } catch (final IOException e) { throw new RuntimeException(e); } } }
FileStorage implements Storage { @Override public void save(final InputStream stream) { FileOutputStream fileOutput; try { fileOutput = new FileOutputStream(configFile); try { IOUtils.copy(stream, fileOutput); } finally { fileOutput.close(); } } catch (final IOException e) { throw new RuntimeException(e); } } FileStorage();   FileStorage(final File localStorageDirectory); }
FileStorage implements Storage { @Override public void save(final InputStream stream) { FileOutputStream fileOutput; try { fileOutput = new FileOutputStream(configFile); try { IOUtils.copy(stream, fileOutput); } finally { fileOutput.close(); } } catch (final IOException e) { throw new RuntimeException(e); } } FileStorage();   FileStorage(final File localStorageDirectory); @Override void save(final InputStream stream); @Override InputStream load(); }
FileStorage implements Storage { @Override public void save(final InputStream stream) { FileOutputStream fileOutput; try { fileOutput = new FileOutputStream(configFile); try { IOUtils.copy(stream, fileOutput); } finally { fileOutput.close(); } } catch (final IOException e) { throw new RuntimeException(e); } } FileStorage();   FileStorage(final File localStorageDirectory); @Override void save(final InputStream stream); @Override InputStream load();  }