public static void copy(InputStream is,Resource out,boolean closeIS) throws IOException {
  OutputStream os=null;
  try {
    os=toBufferedOutputStream(out.getOutputStream());
  }
 catch (  IOException ioe) {
    IOUtil.closeEL(os);
    throw ioe;
  }
  copy(is,os,closeIS,true);
}

public static void copy ( InputStream is , Resource out , boolean closeIS ) throws IOException { OutputStream os = null ; try { os = toBufferedOutputStream ( out . getOutputStream ( ) ) ; } catch ( IOException ioe ) { IOUtil . closeEL ( os ) ; throw ioe ; } copy ( is , os , closeIS , true ) ; }
copy a input resource to a output resource
