@Test(expected = IllegalArgumentException.class) public void testDirectory() { File file = mock(File.class); when(file.isFile()).thenReturn(Boolean.FALSE); FileSource.newInstance(file); }
public static FileSource newInstance(File file) { if (file == null || !file.isFile()) { throw new IllegalArgumentException("A not null File instance that isFile is expected. Path: " + file); } return new FileSource(file); }
FileSource extends AbstractSource<File> { public static FileSource newInstance(File file) { if (file == null || !file.isFile()) { throw new IllegalArgumentException("A not null File instance that isFile is expected. Path: " + file); } return new FileSource(file); } }
FileSource extends AbstractSource<File> { public static FileSource newInstance(File file) { if (file == null || !file.isFile()) { throw new IllegalArgumentException("A not null File instance that isFile is expected. Path: " + file); } return new FileSource(file); } FileSource(File file); }
FileSource extends AbstractSource<File> { public static FileSource newInstance(File file) { if (file == null || !file.isFile()) { throw new IllegalArgumentException("A not null File instance that isFile is expected. Path: " + file); } return new FileSource(file); } FileSource(File file); @Override File getSource(); @Override String toString(); @Override R dispatch(SourceDispatcher<R> dispatcher); @Override SeekableSource initializeSeekableSource(); static FileSource newInstance(File file); }
FileSource extends AbstractSource<File> { public static FileSource newInstance(File file) { if (file == null || !file.isFile()) { throw new IllegalArgumentException("A not null File instance that isFile is expected. Path: " + file); } return new FileSource(file); } FileSource(File file); @Override File getSource(); @Override String toString(); @Override R dispatch(SourceDispatcher<R> dispatcher); @Override SeekableSource initializeSeekableSource(); static FileSource newInstance(File file);  }