-public class HTTPServices{
-
- static private String webRoot = ".";
-
- static private FileInputStream get_reader(String fileName,HTTPResponse resp) throws IOException{
-// if(fileName.equals("/daytime")){
-// String date_str = (new Date()).toString();
-// resp.sentBytes = date_str.length();
-// return
-// new StringReader(date_str);
-// }
-
- if(fileName.equals("/viewlog"))
- fileName = LogFile.log_file_name;
- else
- fileName = webRoot + fileName;
-
- File f = new File(fileName);
- resp.sentBytes = f.length();
- return new FileInputStream(f);
- }