@Test public void invalid_stream() throws Exception { File file = folder.newFile("testing.filelist"); try (FileInputStream input = new FileInputStream(file); FileList.Reader reader = FileList.createReader(input)) { reader.next(); fail(); } catch (IOException e) { } }
public static FileList.Reader createReader(InputStream input) throws IOException { if (input == null) { throw new IllegalArgumentException("input must not be null"); } LOG.debug("Creating a new file list reader"); byte[] dropped = FileListUtil.dropPreamble(input, PREAMBLE_MARGIN); if (dropped.length >= 1) { WGLOG.warn("W19002", new String(dropped, Charset.defaultCharset())); } return new Reader(input); }
FileList { public static FileList.Reader createReader(InputStream input) throws IOException { if (input == null) { throw new IllegalArgumentException("input must not be null"); } LOG.debug("Creating a new file list reader"); byte[] dropped = FileListUtil.dropPreamble(input, PREAMBLE_MARGIN); if (dropped.length >= 1) { WGLOG.warn("W19002", new String(dropped, Charset.defaultCharset())); } return new Reader(input); } }
FileList { public static FileList.Reader createReader(InputStream input) throws IOException { if (input == null) { throw new IllegalArgumentException("input must not be null"); } LOG.debug("Creating a new file list reader"); byte[] dropped = FileListUtil.dropPreamble(input, PREAMBLE_MARGIN); if (dropped.length >= 1) { WGLOG.warn("W19002", new String(dropped, Charset.defaultCharset())); } return new Reader(input); } private  FileList(); }
FileList { public static FileList.Reader createReader(InputStream input) throws IOException { if (input == null) { throw new IllegalArgumentException("input must not be null"); } LOG.debug("Creating a new file list reader"); byte[] dropped = FileListUtil.dropPreamble(input, PREAMBLE_MARGIN); if (dropped.length >= 1) { WGLOG.warn("W19002", new String(dropped, Charset.defaultCharset())); } return new Reader(input); } private  FileList(); @Deprecated static FileStatus createFileStatus(Path path); static FileList.Reader createReader(InputStream input); static FileList.Writer createWriter(OutputStream output); }
FileList { public static FileList.Reader createReader(InputStream input) throws IOException { if (input == null) { throw new IllegalArgumentException("input must not be null"); } LOG.debug("Creating a new file list reader"); byte[] dropped = FileListUtil.dropPreamble(input, PREAMBLE_MARGIN); if (dropped.length >= 1) { WGLOG.warn("W19002", new String(dropped, Charset.defaultCharset())); } return new Reader(input); } private  FileList(); @Deprecated static FileStatus createFileStatus(Path path); static FileList.Reader createReader(InputStream input); static FileList.Writer createWriter(OutputStream output);  }