title: string parsing and decoding in java
body: <p>We need to decode long streams of data flowing.</p>
  
  <p>Each piece of data is a long string comprising encoded sequences,separated by delimiters.
  Each sequence is a made up of encoded keys.</p>
  
  <p>The mapping between the encoded 'keys' and their character equivalents is maintained separately.
  The idea is look up each key in the map;and replace with the corresponding alphabet.</p>
  
  <p>What is the most efficient way of achieving this.</p>
  
  <p>Is a substring and replace the right way to approach handling streams as this?
  Or do we have a higher-performing alternative?</p>