if (xrdsFile != null)
{
BufferedInputStream input = new BufferedInputStream(
new FileInputStream(_testDataPath + "/xrds/" + xrdsFile));
ServletOutputStream output = response.getOutputStream();
byte[] data = new byte[8192];
int bytesRead = input.read(data, 0, data.length);
while (bytesRead > 0)
{
output.write(data, 0, bytesRead);
bytesRead = input.read(data, 0, data.length);
}
input.close();
output.close();
} else if (htmlFile != null) // HTML response
{
BufferedReader input = new BufferedReader(
new FileReader(_testDataPath + "/html/" + htmlFile));
//PrintWriter output = new PrintWriter( response.getWriter());
ServletOutputStream output = response.getOutputStream();
String line = input.readLine();
while (line != null)
{
output.println(line);
line = input.readLine();
}
input.close();
output.close();
}
}