question: public static OutputStream leftShift ( OutputStream self , InputStream in ) throws IOException { byte [ ] buf = new byte [ 1024 ] ; while ( true ) { int count = in . read ( buf , 0 , buf . length ) ; if ( count == - 1 ) break ; if ( count == 0 ) { Thread . yield ( ) ; continue ; } self . write ( buf , 0 , count ) ; } self . flush ( ) ; return self ; }
target:  Pipe an InputStream into an OutputStream for efficient stream copying.