@Test public void bufferingModeDisableShouldCollectNoData() { int windowSize = 10; Reader reader = new StringReader(data); LookAheadBufferedReader classUnderTest = new LookAheadBufferedReader(reader, windowSize, false, false); range(0, 12).forEach(index -> consume(classUnderTest)); assertEquals(LookAheadBufferedReader.BUFFERING_DISABLED_INFO_MESSAGE, classUnderTest.lookAheadAndGetBufferedContent()); }
public String lookAheadAndGetBufferedContent() { try { int ch; while ((ch = super.read()) != -1 && bufferingMode.canAccept(true)) { bufferingMode.forceAppend((char) ch); } } catch (Exception ignore) { } return bufferingMode.toString(); }
LookAheadBufferedReader extends BufferedReader { public String lookAheadAndGetBufferedContent() { try { int ch; while ((ch = super.read()) != -1 && bufferingMode.canAccept(true)) { bufferingMode.forceAppend((char) ch); } } catch (Exception ignore) { } return bufferingMode.toString(); } }
LookAheadBufferedReader extends BufferedReader { public String lookAheadAndGetBufferedContent() { try { int ch; while ((ch = super.read()) != -1 && bufferingMode.canAccept(true)) { bufferingMode.forceAppend((char) ch); } } catch (Exception ignore) { } return bufferingMode.toString(); } LookAheadBufferedReader(Reader in, final int windowSize, boolean isDebugEnabled, boolean isTraceEnabled);  LookAheadBufferedReader(Reader in, final int windowSize, Logger logger);  LookAheadBufferedReader(Reader in, Logger logger); }
LookAheadBufferedReader extends BufferedReader { public String lookAheadAndGetBufferedContent() { try { int ch; while ((ch = super.read()) != -1 && bufferingMode.canAccept(true)) { bufferingMode.forceAppend((char) ch); } } catch (Exception ignore) { } return bufferingMode.toString(); } LookAheadBufferedReader(Reader in, final int windowSize, boolean isDebugEnabled, boolean isTraceEnabled);  LookAheadBufferedReader(Reader in, final int windowSize, Logger logger);  LookAheadBufferedReader(Reader in, Logger logger); @Override int read(); String lookAheadAndGetBufferedContent(); }
LookAheadBufferedReader extends BufferedReader { public String lookAheadAndGetBufferedContent() { try { int ch; while ((ch = super.read()) != -1 && bufferingMode.canAccept(true)) { bufferingMode.forceAppend((char) ch); } } catch (Exception ignore) { } return bufferingMode.toString(); } LookAheadBufferedReader(Reader in, final int windowSize, boolean isDebugEnabled, boolean isTraceEnabled);  LookAheadBufferedReader(Reader in, final int windowSize, Logger logger);  LookAheadBufferedReader(Reader in, Logger logger); @Override int read(); String lookAheadAndGetBufferedContent();  }