Examples of TextFile


Examples of org.apache.jorphan.io.TextFile

        Document doc = null;
        // if either a file or path location is given,
        // get the file object.
        if (file.length() > 0) {// we have a file
            if (this.getReadResponse()) {
                TextFile tfile = new TextFile(file);
                fileContents = tfile.getText();
            }
            FileInputStream fileInputStream = null;
            try {
                fileInputStream = new FileInputStream(file);
                doc = XDB.parse(fileInputStream);
View Full Code Here

Examples of org.apache.jorphan.io.TextFile

     *
     * @param path
     * @return the contents of the file
     */
    public String getFileContent(String path) {
        TextFile tf = new TextFile(path);
        return tf.getText();
    }
View Full Code Here

Examples of org.apache.jorphan.io.TextFile

            HTTPSampleResult result = new HTTPSampleResult();
            HTTPSamplerBase context = (HTTPSamplerBase) SaveService.loadTree(
                    new FileInputStream(System.getProperty("user.dir") + "/testfiles/Load_JMeter_Page.jmx")).getArray()[0];
            jmctx.setCurrentSampler(context);
            jmctx.setCurrentSampler(config);
            result.setResponseData(new TextFile(System.getProperty("user.dir") + HTMLFileName).getText().getBytes());
            result.setSampleLabel(context.toString());
            result.setSamplerData(context.toString());
            result.setURL(new URL("http://issues.apache.org/fakepage.html"));
            jmctx.setPreviousResult(result);
            AnchorModifier modifier = new AnchorModifier();
View Full Code Here

Examples of org.apache.jorphan.io.TextFile

        Document doc = null;
        // if either a file or path location is given,
        // get the file object.
        if (file.length() > 0) {// we have a file
            if (this.getReadResponse()) {
                TextFile tfile = new TextFile(file);
                fileContents = tfile.getText();
            }
            FileInputStream fileInputStream = null;
            try {
                fileInputStream = new FileInputStream(file);
                doc = XDB.parse(fileInputStream);
View Full Code Here

Examples of org.apache.jorphan.io.TextFile

            config.setRunningVersion(true);
            SampleResult result = new SampleResult();
            HTTPSampler context = (HTTPSampler) SaveService.loadSubTree(new FileInputStream(System.getProperty("user.dir") + "/testfiles/Load_JMeter_Page.jmx")).getArray()[0];
            JMeterContextService.getContext().setCurrentSampler(context);
            JMeterContextService.getContext().setCurrentSampler(config);
            result.setResponseData(new TextFile(System.getProperty("user.dir") + "/testfiles/jmeter_home_page.html").getText().getBytes());
            result.setSampleLabel(context.toString());
            result.setSamplerData(context.toString());
            JMeterContextService.getContext().setPreviousResult(result);
            AnchorModifier modifier = new AnchorModifier();
            modifier.process();
View Full Code Here

Examples of org.apache.jorphan.io.TextFile

  private String retrieveRuntimeXmlData()
  {
    String file = getRandomFileName();
    if(file.length() > 0)
    {
      TextFile contents = new TextFile(file);
      if(contents.exists())
      {
        return contents.getText();
      }
    }
    return getXmlData();
  }
View Full Code Here

Examples of org.apache.ws.jaxme.js.TextFile

              JavaSource js = (JavaSource) iter.next();
              File f = jsf.getLocation(targetDirectory, js).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
            for (Iterator iter = jsf.getTextFiles();  iter.hasNext()) {
              TextFile tf = (TextFile) iter.next();
              File f = jsf.getLocation(targetDirectory, tf).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
          }
        } catch (SAXParseException e) {
View Full Code Here

Examples of org.apache.ws.jaxme.js.TextFile

      String packageName = ctx.getXMLInterfaceName().getPackageName();
      if (packages.containsKey(packageName)) {
        continue;
      }

      TextFile textFile = pController.getJavaSourceFactory().newTextFile(packageName, "jaxb.properties");
      textFile.addLine(JAXBContext.JAXB_CONTEXT_FACTORY + "=" + JAXBContextImpl.class.getName());
      packages.put(packageName, textFile);

      String configFile = generateConfigFile(pController, packageName, contextList);
      TextFile confFile = pController.getJavaSourceFactory().newTextFile(packageName, "Configuration.xml");
      confFile.setContents(configFile);

      getObjectFactory(pController, packageName, contextList);
    }
  }
View Full Code Here

Examples of org.apache.ws.jaxme.js.TextFile

              JavaSource js = (JavaSource) iter.next();
              File f = jsf.getLocation(targetDirectory, js).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
            for (Iterator iter = jsf.getTextFiles();  iter.hasNext()) {
              TextFile tf = (TextFile) iter.next();
              File f = jsf.getLocation(targetDirectory, tf).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
          }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.ws.jaxme.js.TextFile

              JavaSource js = (JavaSource) iter.next();
              File f = jsf.getLocation(targetDirectory, js).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
            for (Iterator iter = jsf.getTextFiles();  iter.hasNext()) {
              TextFile tf = (TextFile) iter.next();
              File f = jsf.getLocation(targetDirectory, tf).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
          }
        } catch (Exception e) {
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.