@Test public void parseInvalidCompressionGzipFile() throws Exception { File gzipFile = new File("src/test/resources/gzip/invalid-compression.gz"); assertTrue( gzipFile.isFile() ); GzipModule gzm = new GzipModule(); RepInfo info = new RepInfo(gzipFile.getAbsolutePath()); gzm.parse(new FileInputStream(gzipFile), info, 0); assertEquals(RepInfo.FALSE, info.getWellFormed()); assertEquals(RepInfo.FALSE, info.getValid()); assertTrue(info.getSigMatch().isEmpty()); assertEquals(1, info.getMessage().size()); Map<String, Integer> messages = extractMessages(info.getMessage()); assertEquals(1, messages.size()); assertEquals(1, messages.get(DiagnosisType.INVALID_EXPECTED.name()).intValue()); }
@Override public void parse(RandomAccessFile file, RepInfo info) { InputStream stream = new RandomAccessFileInputStream(file); parse(stream, info, 0); }
GzipModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) { InputStream stream = new RandomAccessFileInputStream(file); parse(stream, info, 0); } }
GzipModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) { InputStream stream = new RandomAccessFileInputStream(file); parse(stream, info, 0); } GzipModule(); }
GzipModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) { InputStream stream = new RandomAccessFileInputStream(file); parse(stream, info, 0); } GzipModule(); @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); }
GzipModule extends ModuleBase { @Override public void parse(RandomAccessFile file, RepInfo info) { InputStream stream = new RandomAccessFileInputStream(file); parse(stream, info, 0); } GzipModule(); @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);  }