@Test public void testSplitMessage() throws Exception { String obj = "ABCDEFG"; msg.addObjectHeader(obj, obj); LineCountSplitter s = new LineCountSplitter(); List<AdaptrisMessage> result = toList(s.splitMessage(msg)); assertEquals("10 split messages", 10, result.size()); for (AdaptrisMessage m : result) { assertFalse("Should not contain object metadata", m.getObjectHeaders().containsKey(obj)); } }
@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);  }