Added TwoPhaseBufferedInputStream.