Anwendung#
ByteArrayInputStream inputStream = new ByteArrayInputStream("dies ist ein--test mit splittern--ende----".getBytes()); for (SplitInputStream splitInputStream : new StreamSplitter(inputStream, "--", "----")) { IOUtils.copy(splitInputStream, System.out); System.out.println(); }