code: public static Policy readPolicy(CmsObject cms, String sitePath) {
  
          try {
              CmsFile policyFile = cms.readFile(sitePath);
              ByteArrayInputStream input = new ByteArrayInputStream(policyFile.getContents());
  
              // we use the deprecated method here because it is the only way to load
              // a policy directly from the VFS.
              Policy policy = Policy.getInstance(input);
              return policy;
          } catch (CmsException e) {
              LOG.error("Could not read Antisamy policy file");
              LOG.error(e.getLocalizedMessage(), e);
              return null;
          } catch (PolicyException e) {
              LOG.error("Invalid Antisamy policy read from " + sitePath);
              LOG.error(e.getLocalizedMessage(), e);
              return null;
          }
      }
docs: Helper method for reading an AntiSamy policy file from the VFS.<p>
  
  @param cms the current CMS context
  @param sitePath the site path of the policy file
  
  @return the policy object for the given path