work-around potential Android 2.3 bug with reading streams