Package com.knowgate.dfs

Examples of com.knowgate.dfs.FileSystem.writefilestr()


      if (sSelPageOptions.length()==0)
        oFS.writefilestr(sOutputPath + oCurrentPage.getTitle().replace(' ','_') + "_." + sMedia, oPostTransform.toString(), "UTF-8");
      else
        try {
          oFS.writefilestr(sOutputPath + oCurrentPage.getTitle().replace(' ','_') + "_." + sMedia, Gadgets.replace(oPostTransform.toString(), ":selPageOptions", sSelPageOptions), "UTF-8");

        } catch (Exception e) {/* Ignore MalformedPatternException, is never thrown */ }

      // Desreferenciar los buffers intermedios para liberar memoria lo antes posible
      oPostTransform = null;
View Full Code Here


      !sFilePath.startsWith("http://") && !sFilePath.startsWith("file://"))
      sFilePath = "file://" + sFilePath;

    FileSystem oFs = new FileSystem();

  oFs.writefilestr(sFilePath, oTemplate.toString(), "UTF-8");
 
  } // store

     
}
View Full Code Here

       oOutStream.close();

       oInStream.close();
       oInStream = null;

       oFS.writefilestr (sFileDir+File.separator+sCachedFile, sOutput, sEncoding==null ? "ISO8859_1" : sEncoding);
     }
     catch (TransformerConfigurationException tce) {
       if (DebugFile.trace) {
         DebugFile.writeln("TransformerConfigurationException " + tce.getMessageAndLocation());
         try {
View Full Code Here

       oOutStream.close();

       oInStream.close();
       oInStream = null;

       oFS.writefilestr (sFileDir+File.separator+sCachedFile, sOutput, sEncoding==null ? "ISO8859_1" : sEncoding);
      }
      catch (TransformerConfigurationException tce) {
       if (DebugFile.trace) {
         DebugFile.writeln("TransformerConfigurationException " + tce.getMessageAndLocation());
         try {
View Full Code Here

       oOutStream.close();

       oInStream.close();
       oInStream = null;

       oFS.writefilestr (sFileDir+File.separator+sCachedFile, sOutput, sEncoding==null ? "ISO8859_1" : sEncoding);
     }
     catch (TransformerConfigurationException tce) {
       if (DebugFile.trace) {
         DebugFile.writeln("TransformerConfigurationException " + tce.getMessageAndLocation());
         try {
View Full Code Here

        sMessageList = Forums.XMLListTopLevelMessagesForGroup(oConn, t.getLimit(), 0, getGuid(), DB.dt_published);
        sXMLDataSource = sXmlProlog + "<Journal guid=\""+getGuid()+"\">\n" + sNewsGrpXml + "\n" + sMonthsWithPosts + "\n" + sMessageList + "</Journal>";

      if (DebugFile.trace) {
        oFs.delete(getOutputPath()+"main.xml");
        oFs.writefilestr(getOutputPath()+"main.xml", sXMLDataSource, getEncoding());
      }

        oFs.writefilestr(sFilePath,
                         StylesheetCache.transform(getBlogPath()+t.getInputFilePath(), sXMLDataSource, oProps), getEncoding());
    } // fi (bNeedsRebuild)
View Full Code Here

      if (DebugFile.trace) {
        oFs.delete(getOutputPath()+"main.xml");
        oFs.writefilestr(getOutputPath()+"main.xml", sXMLDataSource, getEncoding());
      }

        oFs.writefilestr(sFilePath,
                         StylesheetCache.transform(getBlogPath()+t.getInputFilePath(), sXMLDataSource, oProps), getEncoding());
    } // fi (bNeedsRebuild)

      } else if (t.getFilter().equalsIgnoreCase("rss2")) {
View Full Code Here

        try {
          sMessageList = Gadgets.replace(sMessageList,"<((IMG)|img) +((SRC)|(src))=\"/", "<img src=\""+getBaseHref()+"/");
        } catch (org.apache.oro.text.regex.MalformedPatternException neverthrown) { }
        sXMLDataSource = sXmlProlog + "<Journal guid=\""+getGuid()+"\">\n" + sNewsGrpXml + "\n" + sMessageList + "</Journal>";

        oFs.writefilestr(sFilePath,
                         StylesheetCache.transform(getBlogPath()+t.getInputFilePath(), sXMLDataSource, oProps), getEncoding());
      if (DebugFile.trace) {
          oFs.writefilestr(sFilePath+".source.xml", sXMLDataSource, getEncoding());
      }
    } // fi (bNeedsRebuild)
View Full Code Here

        sXMLDataSource = sXmlProlog + "<Journal guid=\""+getGuid()+"\">\n" + sNewsGrpXml + "\n" + sMessageList + "</Journal>";

        oFs.writefilestr(sFilePath,
                         StylesheetCache.transform(getBlogPath()+t.getInputFilePath(), sXMLDataSource, oProps), getEncoding());
      if (DebugFile.trace) {
          oFs.writefilestr(sFilePath+".source.xml", sXMLDataSource, getEncoding());
      }
    } // fi (bNeedsRebuild)

    } else if (t.getFilter().equalsIgnoreCase("monthly")) {
View Full Code Here

        sMessageList = Forums.XMLListTopLevelMessagesForGroup(oConn, m.firstDay(), m.lastDay(), getGuid(), DB.dt_published);
            sXMLDataSource = sXmlProlog + "<Journal guid=\""+getGuid()+"\">\n" + sNewsGrpXml + "\n" + sMonthsWithPosts + "\n" + sMessageList + "</Journal>";

          if (DebugFile.trace) {
            oFs.delete(Gadgets.dechomp(sFilePath,"html")+"xml");
            oFs.writefilestr(Gadgets.dechomp(sFilePath,"html")+"xml", sXMLDataSource, getEncoding());
          }

            oFs.writefilestr(sFilePath,
                             StylesheetCache.transform(getBlogPath()+t.getInputFilePath(), sXMLDataSource, oProps), getEncoding());
        } // fi
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.