adding all of botlist, initial add
[botlist.git] / botlistprojects / botspider / spider / lib / java / spider_remote / src / org / spirit / loadtest / LoadTestWriteHtmlDoc.java
blobd23a123320ea26975d0f76453a2fc2ac771af469
1 /*
2 * Create file LoadTestWriteHtmlDoc.java
3 * Created on Jul 23, 2007
4 */
6 package org.spirit.loadtest;
8 import java.io.BufferedWriter;
9 import java.io.FileWriter;
10 import java.io.IOException;
12 /**
13 * Utility class for when writing the HTML document to the client filesystem.
15 public class LoadTestWriteHtmlDoc {
17 public static String generatedHtmlFilename(final String request_url) {
18 String filename = LoadTestCookieManager.filterAlphaNumeric(request_url);
19 return filename;
22 public static void writeOutput(final String filename, final String alldata) {
23 String outfilename = filename;
24 BufferedWriter out = null;
25 try {
26 out = new BufferedWriter(new FileWriter(outfilename, false));
27 out.write(alldata);
28 } catch (IOException ioe) {
29 ioe.printStackTrace();
30 } finally {
31 try {
32 out.flush();
33 } catch (IOException e) {
35 try {
36 out.close();
37 } catch (IOException e) {
42 //=========================================================
43 //End of File
44 //=========================================================