IteratingSMILESReader extends DefaultIteratingChemObjectReader<IAtomContainer> { @Override public void remove() { throw new UnsupportedOperationException(); } IteratingSMILESReader(Reader in, IChemObjectBuilder builder);  IteratingSMILESReader(InputStream in, IChemObjectBuilder builder); @Override IResourceFormat getFormat(); @Override boolean hasNext(); @Override IAtomContainer next(); @Override void close(); @Override void remove(); @Override void setReader(Reader reader); @Override void setReader(InputStream reader); static final String BAD_SMILES_INPUT; }
@Test(expected = UnsupportedOperationException.class) public void testRemove() { String filename = "data/smiles/test2.smi"; InputStream ins1 = this.getClass().getClassLoader().getResourceAsStream(filename); IteratingSMILESReader reader = new IteratingSMILESReader(ins1, DefaultChemObjectBuilder.getInstance()); int molCount = 0; while (reader.hasNext()) { reader.next(); molCount++; if (molCount > 2) break; } reader.remove(); }