Examples of TextFile


Examples of hudson.util.TextFile

        /**
         * This is where the browser sends us the data.
         */
        public void doPostBack(StaplerRequest req, StaplerResponse rsp) throws IOException {
            long dataTimestamp = System.currentTimeMillis();
            TextFile df = getDataFile();
            df.write(IOUtils.toString(req.getInputStream(),"UTF-8"));
            df.file.setLastModified(dataTimestamp);
            due = dataTimestamp+getInterval();
            LOGGER.info("Obtained the updated data file for "+id);
            rsp.setContentType("text/plain")// So browser won't try to parse response
        }
View Full Code Here

Examples of net.sf.laja.example.file.behaviour.text.TextFile

        return new WritableFile(state, directory, createIfNotExists);
    }

    // (list)
    public TextFile asTextFile() {
        return new TextFile(state, directory);
    }
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(), 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

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

                                + "/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

Examples of org.apache.jorphan.io.TextFile

    {
        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

Examples of org.apache.jorphan.io.TextFile

                                + "/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

Examples of org.apache.jorphan.io.TextFile

    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

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