@Test public void testIterator_Remove() throws Exception { MessageSplitterImp splitter = new LineCountSplitter(1); try (CloseableIterable<AdaptrisMessage> iterable = CloseableIterable .ensureCloseable(splitter.splitMessage(msg))) { Iterator<AdaptrisMessage> first = iterable.iterator(); try { if (first.hasNext()) first.next(); first.remove(); fail(); } catch (UnsupportedOperationException expected) { } } }
@Override public CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg) throws CoreException { logR.trace("LineCountSplitter splits every {} lines", splitOnLine()); try { BufferedReader buf = new BufferedReader(msg.getReader(), bufferSize()); return new LineCountSplitGenerator(buf, msg, selectFactory(msg), readHeader(buf)); } catch (IOException e) { throw new CoreException(e); } }
LineCountSplitter extends MessageSplitterImp { @Override public CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg) throws CoreException { logR.trace("LineCountSplitter splits every {} lines", splitOnLine()); try { BufferedReader buf = new BufferedReader(msg.getReader(), bufferSize()); return new LineCountSplitGenerator(buf, msg, selectFactory(msg), readHeader(buf)); } catch (IOException e) { throw new CoreException(e); } } }
LineCountSplitter extends MessageSplitterImp { @Override public CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg) throws CoreException { logR.trace("LineCountSplitter splits every {} lines", splitOnLine()); try { BufferedReader buf = new BufferedReader(msg.getReader(), bufferSize()); return new LineCountSplitGenerator(buf, msg, selectFactory(msg), readHeader(buf)); } catch (IOException e) { throw new CoreException(e); } } LineCountSplitter();  LineCountSplitter(Integer splitOnLine); }
LineCountSplitter extends MessageSplitterImp { @Override public CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg) throws CoreException { logR.trace("LineCountSplitter splits every {} lines", splitOnLine()); try { BufferedReader buf = new BufferedReader(msg.getReader(), bufferSize()); return new LineCountSplitGenerator(buf, msg, selectFactory(msg), readHeader(buf)); } catch (IOException e) { throw new CoreException(e); } } LineCountSplitter();  LineCountSplitter(Integer splitOnLine); @Override CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg); void setSplitOnLine(Integer i); Integer getSplitOnLine(); void setIgnoreBlankLines(Boolean b); Boolean getIgnoreBlankLines(); Integer getBufferSize(); void setBufferSize(Integer b); Integer getKeepHeaderLines(); void setKeepHeaderLines(Integer keepHeaderLines); }
LineCountSplitter extends MessageSplitterImp { @Override public CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg) throws CoreException { logR.trace("LineCountSplitter splits every {} lines", splitOnLine()); try { BufferedReader buf = new BufferedReader(msg.getReader(), bufferSize()); return new LineCountSplitGenerator(buf, msg, selectFactory(msg), readHeader(buf)); } catch (IOException e) { throw new CoreException(e); } } LineCountSplitter();  LineCountSplitter(Integer splitOnLine); @Override CloseableIterable<AdaptrisMessage> splitMessage(final AdaptrisMessage msg); void setSplitOnLine(Integer i); Integer getSplitOnLine(); void setIgnoreBlankLines(Boolean b); Boolean getIgnoreBlankLines(); Integer getBufferSize(); void setBufferSize(Integer b); Integer getKeepHeaderLines(); void setKeepHeaderLines(Integer keepHeaderLines);  }