public static void copy(Resource in,OutputStream os,boolean closeOS) throws IOException {
  InputStream is=null;
  try {
    is=toBufferedInputStream(in.getInputStream());
  }
 catch (  IOException ioe) {
    IOUtil.closeEL(is);
    throw ioe;
  }
  copy(is,os,true,closeOS);
}

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