An experiment with the Decorator Pattern on Java-io-streams following on from the Head First Design Patterns chapter on the Decorator Pattern.
Four InputStream decorators are provided:
- LowerCase - makes all characters lower case
- FlipCase - flips the case of each character in the stream
- AlternatingCase - makes the alphabetic characters alternate in case e.g. AlTeRnAtE
- L33tSpeak - translates to basic l33t speak where the vowels a, e, i and o are replaced with the numbers 4, 3, 1 and 0 respectively e.g. 'Hello I am a robot' becomes 'H3ll0 1 4m 4 r0b0t'