@Test public void parseInvalidEmptyFile() throws Exception { File warcFile = new File("src/test/resources/warc/invalid-empty.warc"); WarcModule wm = new WarcModule(); RepInfo info = new RepInfo(warcFile.getAbsolutePath()); wm.parse(new FileInputStream(warcFile), info, 0); invalidCheck(info); assertEquals(1, info.getMessage().size()); Map<String, Integer> messages = extractMessages(info.getMessage()); assertEquals(1, messages.size()); assertEquals(1, messages.get(DiagnosisType.ERROR_EXPECTED.name()).intValue()); }
@Override public void parse(RandomAccessFile file, RepInfo info) throws IOException { try (InputStream stream = new RandomAccessFileInputStream(file)) { parse(stream, info, 0); } }
WarcModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) throws IOException { try (InputStream stream = new RandomAccessFileInputStream(file)) { parse(stream, info, 0); } } }
WarcModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) throws IOException { try (InputStream stream = new RandomAccessFileInputStream(file)) { parse(stream, info, 0); } } WarcModule(); }
WarcModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) throws IOException { try (InputStream stream = new RandomAccessFileInputStream(file)) { parse(stream, info, 0); } } WarcModule(); @Override void resetParams(); @Override void checkSignatures(File file,
            InputStream stream,
            RepInfo info); @Override void checkSignatures(File file,
            RandomAccessFile raf,
            RepInfo info); @Override void parse(RandomAccessFile file, RepInfo info); @Override int parse(InputStream stream, RepInfo info, int parseIndex); }
WarcModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) throws IOException { try (InputStream stream = new RandomAccessFileInputStream(file)) { parse(stream, info, 0); } } WarcModule(); @Override void resetParams(); @Override void checkSignatures(File file,
            InputStream stream,
            RepInfo info); @Override void checkSignatures(File file,
            RandomAccessFile raf,
            RepInfo info); @Override void parse(RandomAccessFile file, RepInfo info); @Override int parse(InputStream stream, RepInfo info, int parseIndex);  }