code: public void replaceResource(
          String resourcename,
          I_CmsResourceType type,
          byte[] content,
          List<CmsProperty> properties)
      throws CmsException {
  
          CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION);
          getResourceType(resource).replaceResource(this, m_securityManager, resource, type, content, properties);
      }
docs: Replaces the content, type and properties of a resource.<p>
  
  @param resourcename the name of the resource to replace (full current site relative path)
  @param type the new type of the resource
  @param content the new content of the resource
  @param properties the new properties of the resource
  
  @throws CmsException if something goes wrong