code: 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;
      }
docs: Pipe an InputStream into an OutputStream for efficient stream copying.
  
  @param self stream on which to write
  @param in   stream to read from
  @return the outputstream itself
  @throws IOException if an I/O error occurs.
  @since 1.0