code: 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);
      }
docs: copy a input resource to a output resource
  
  @param in
  @param out
  @throws IOException