@Test(expected = NullPointerException.class) public void reportsErrorOnUsingNullFile() throws Exception { new DirectoryExporter(null).export(this); }
@Override public void export(Handler handler) throws IOException { if (!mDir.isDirectory()) throw new IOException("not a directory"); for (String fileName : mDir.list()) { exportFile(fileName, new FileInputStream(new File(mDir, fileName)), handler); } }
DirectoryExporter implements Exporter { @Override public void export(Handler handler) throws IOException { if (!mDir.isDirectory()) throw new IOException("not a directory"); for (String fileName : mDir.list()) { exportFile(fileName, new FileInputStream(new File(mDir, fileName)), handler); } } }
DirectoryExporter implements Exporter { @Override public void export(Handler handler) throws IOException { if (!mDir.isDirectory()) throw new IOException("not a directory"); for (String fileName : mDir.list()) { exportFile(fileName, new FileInputStream(new File(mDir, fileName)), handler); } } DirectoryExporter(File dir); }
DirectoryExporter implements Exporter { @Override public void export(Handler handler) throws IOException { if (!mDir.isDirectory()) throw new IOException("not a directory"); for (String fileName : mDir.list()) { exportFile(fileName, new FileInputStream(new File(mDir, fileName)), handler); } } DirectoryExporter(File dir); @Override void export(Handler handler); }
DirectoryExporter implements Exporter { @Override public void export(Handler handler) throws IOException { if (!mDir.isDirectory()) throw new IOException("not a directory"); for (String fileName : mDir.list()) { exportFile(fileName, new FileInputStream(new File(mDir, fileName)), handler); } } DirectoryExporter(File dir); @Override void export(Handler handler);  }