@Test public void crlfWhereLFdoesNotFitInInitialBuffer() throws Exception { InputStream is = stringToIs("oleg\r\njoe"); TextLineDemarcator demarcator = new TextLineDemarcator(is, 5); OffsetInfo offsetInfo = demarcator.nextOffsetInfo(); assertEquals(0, offsetInfo.getStartOffset()); assertEquals(6, offsetInfo.getLength()); assertEquals(2, offsetInfo.getCrlfLength()); assertTrue(offsetInfo.isStartsWithMatch()); offsetInfo = demarcator.nextOffsetInfo(); assertEquals(6, offsetInfo.getStartOffset()); assertEquals(3, offsetInfo.getLength()); assertEquals(0, offsetInfo.getCrlfLength()); assertTrue(offsetInfo.isStartsWithMatch()); }
public OffsetInfo nextOffsetInfo() throws IOException { return this.nextOffsetInfo(null); }
TextLineDemarcator extends AbstractDemarcator { public OffsetInfo nextOffsetInfo() throws IOException { return this.nextOffsetInfo(null); } }
TextLineDemarcator extends AbstractDemarcator { public OffsetInfo nextOffsetInfo() throws IOException { return this.nextOffsetInfo(null); } TextLineDemarcator(InputStream is);  TextLineDemarcator(InputStream is, int initialBufferSize); }
TextLineDemarcator extends AbstractDemarcator { public OffsetInfo nextOffsetInfo() throws IOException { return this.nextOffsetInfo(null); } TextLineDemarcator(InputStream is);  TextLineDemarcator(InputStream is, int initialBufferSize); OffsetInfo nextOffsetInfo(); OffsetInfo nextOffsetInfo(byte[] startsWith); }
TextLineDemarcator extends AbstractDemarcator { public OffsetInfo nextOffsetInfo() throws IOException { return this.nextOffsetInfo(null); } TextLineDemarcator(InputStream is);  TextLineDemarcator(InputStream is, int initialBufferSize); OffsetInfo nextOffsetInfo(); OffsetInfo nextOffsetInfo(byte[] startsWith);  }