public static void copyNoClose(InputStream i,OutputStream o,int bufferSize) throws IOException {
  byte[] buffer=new byte[bufferSize];
  int size=i.read(buffer);
  while (size > -1) {
    o.write(buffer,0,size);
    size=i.read(buffer);
  }
}

public static void copyNoClose ( InputStream i , OutputStream o , int bufferSize ) throws IOException { byte [ ] buffer = new byte [ bufferSize ] ; int size = i . read ( buffer ) ; while ( size > - 1 ) { o . write ( buffer , 0 , size ) ; size = i . read ( buffer ) ; } }
copy the input stream into the output stream , without closing the streams when done
