I'm not sure you need the extra `BufferedReader` here.  The `ByteArrayInputStream` is already in memory so is buffered.