@Test public void testMultiCharDelimiter() throws Exception { StringReader sr = new StringReader( "abc ${content ${'old - content '} more text ${'abc' test'}"); DelimiterFilterReader filterReader = new DelimiterFilterReader(sr, "${'", "'}", new ReplacingMatchProcessor(true, "replaced")); Assert.assertEquals("abc ${content ${'replaced'} more text ${'replaced'}", readToString(filterReader)); sr.reset(); filterReader = new DelimiterFilterReader(sr, "${'", "'}", new ReplacingMatchProcessor(false, "replaced")); Assert.assertEquals("abc ${content replaced more text replaced", readToString(filterReader)); sr.reset(); filterReader = new DelimiterFilterReader(sr, "${'", "'}", new ReplacingMatchProcessor(false, "")); Assert.assertEquals("abc ${content more text ", readToString(filterReader)); }
@Override public void reset() throws IOException { reader.reset(); eofReached = false; bufferedContent = null; bufferedContentReadPos = 0; }
DelimiterFilterReader extends Reader { @Override public void reset() throws IOException { reader.reset(); eofReached = false; bufferedContent = null; bufferedContentReadPos = 0; } }
DelimiterFilterReader extends Reader { @Override public void reset() throws IOException { reader.reset(); eofReached = false; bufferedContent = null; bufferedContentReadPos = 0; } DelimiterFilterReader(Reader reader, String startDelimiter, String endDelimiter,
            DelimiterFilterMatchProcessor matchProcessor); }
DelimiterFilterReader extends Reader { @Override public void reset() throws IOException { reader.reset(); eofReached = false; bufferedContent = null; bufferedContentReadPos = 0; } DelimiterFilterReader(Reader reader, String startDelimiter, String endDelimiter,
            DelimiterFilterMatchProcessor matchProcessor); @Override void close(); @Override int read(); @Override int read(char[] cbuf, int off, int len); @Override void reset(); }
DelimiterFilterReader extends Reader { @Override public void reset() throws IOException { reader.reset(); eofReached = false; bufferedContent = null; bufferedContentReadPos = 0; } DelimiterFilterReader(Reader reader, String startDelimiter, String endDelimiter,
            DelimiterFilterMatchProcessor matchProcessor); @Override void close(); @Override int read(); @Override int read(char[] cbuf, int off, int len); @Override void reset();  }