@Test public void testReset() throws IOException { ObjectStream<String> stream = new PlainTextByLineStream(new MockInputStreamFactory(testString), StandardCharsets.UTF_8); Assert.assertEquals("line1", stream.read()); Assert.assertEquals("line2", stream.read()); Assert.assertEquals("line3", stream.read()); stream.reset(); Assert.assertEquals("line1", stream.read()); Assert.assertEquals("line2", stream.read()); Assert.assertEquals("line3", stream.read()); Assert.assertEquals("line4", stream.read()); Assert.assertNull(stream.read()); stream.close(); }
public void reset() throws IOException { in = new BufferedReader(new InputStreamReader(inputStreamFactory.createInputStream(), encoding)); }
PlainTextByLineStream implements ObjectStream<String> { public void reset() throws IOException { in = new BufferedReader(new InputStreamReader(inputStreamFactory.createInputStream(), encoding)); } }
PlainTextByLineStream implements ObjectStream<String> { public void reset() throws IOException { in = new BufferedReader(new InputStreamReader(inputStreamFactory.createInputStream(), encoding)); } PlainTextByLineStream(InputStreamFactory inputStreamFactory,
                               String charsetName);  PlainTextByLineStream(InputStreamFactory inputStreamFactory,
                               Charset charset); }
PlainTextByLineStream implements ObjectStream<String> { public void reset() throws IOException { in = new BufferedReader(new InputStreamReader(inputStreamFactory.createInputStream(), encoding)); } PlainTextByLineStream(InputStreamFactory inputStreamFactory,
                               String charsetName);  PlainTextByLineStream(InputStreamFactory inputStreamFactory,
                               Charset charset); String read(); void reset(); void close(); }
PlainTextByLineStream implements ObjectStream<String> { public void reset() throws IOException { in = new BufferedReader(new InputStreamReader(inputStreamFactory.createInputStream(), encoding)); } PlainTextByLineStream(InputStreamFactory inputStreamFactory,
                               String charsetName);  PlainTextByLineStream(InputStreamFactory inputStreamFactory,
                               Charset charset); String read(); void reset(); void close();  }