summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/ioutils/SimpleBlockReader.java
AgeCommit message (Collapse)Author
2017-03-27Implement more BlockReader typesbculkin2442
Adds additional useful block reader types. * LayeredBlockReader, which represents priority * SerialBlockReader, which concatenates readers
2017-03-26Make BlockReader abstract, with varying impls.bculkin2442
This allows cool things to be accomplished through chaining BlockReaders together without having to handle the block plumbing yourself. The current set of implementations are a simple one that reads blocks from a scanner delimited by a pattern, one that has a queue of blocks it will attempt to pull from before reading, and one that triggers an action before a block is read. As an example use, for FDS, a combo of simple -> triggered -> pushback is used where the triggered is used for prompting the user, and the pushback supports macros.