public static void pipeAll(InputStream inStr,OutputStream outStr) throws IOException {
  byte[] bs=new byte[BUFFER_SIZE];
  int numRead;
  while ((numRead=inStr.read(bs,0,bs.length)) >= 0) {
    outStr.write(bs,0,numRead);
  }
}

public static void pipeAll ( InputStream inStr , OutputStream outStr ) throws IOException { byte [ ] bs = new byte [ BUFFER_SIZE ] ; int numRead ; while ( ( numRead = inStr . read ( bs , 0 , bs . length ) ) >= 0 ) { outStr . write ( bs , 0 , numRead ) ; } }
write the full contents of instr to the destination stream outstr .
