code: public Document buildNtFile(String mimeType, String encoding) {
      Document doc = documentBuilder.newDocument();
      Element jcrRoot = createJcrRoot(doc, NT_FILE);
      Element jcrContent = createJcrContent(doc, jcrRoot, NT_RESOURCE);
  
      if (StringUtils.isNotEmpty(mimeType)) {
        setAttributeNamespaceAware(jcrContent, "jcr:mimeType", mimeType);
      }
      if (StringUtils.isNotEmpty(encoding)) {
        setAttributeNamespaceAware(jcrContent, "jcr:encoding", encoding);
      }
  
      return doc;
    }
docs: Build XML for nt:file
  @param mimeType Mime type
  @param encoding Encoding
  @return nt:file XML