When you do the switch here, the overflow won't be flushed until the BufferedReader fills up. Does it make sense to do a flush() at his point, prior to returning the BufferedReader, to ensure that this part is done before wrapping the stream?

Secondly, can the result of overflow() ever be a buffered writer (e.g. if we call this twice)? Should we code for that possibility and not wrap a wrapped bufferedoutputstream if that's the case? e.g. have something like if (!overflow instanceof BufferedOutputStream) overflow = new BufferedOutputStream(overflow,..)