Package org.apache.jorphan.io

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(), null);
            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


        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

     *
     * @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

                                + "/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());
View Full Code Here

    {
        String file = getRandomFileName();
        if (file.length() > 0)
        {
          if (this.getReadResponse()){
            TextFile tfile = new TextFile(file);
            FILE_CONTENTS = tfile.getText();
          }
          return new File(file);
        } else {
          return null;
        }
View Full Code Here

                                + "/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());
View Full Code Here

    private static boolean trimLastLine(String filename)
    {
        try
        {
            TextFile text = new TextFile(filename);
            if (!text.exists())
            {
                return false;
            }
            String xml = text.getText();
            xml = xml.substring(0, xml.indexOf("</testResults>"));
            text.setText(xml);
        }
        catch (Exception e)
        {
            return false;
        }
View Full Code Here

        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();
            }
            InputStream fileInputStream = null;
            try {
                fileInputStream = new BufferedInputStream(new FileInputStream(file));
                doc = XDB.parse(fileInputStream);
View Full Code Here

     *
     * @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

   *
   * @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

TOP

Related Classes of org.apache.jorphan.io.TextFile

Copyright © 2018 www.massapicom. 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.