129 |
byte[] bytes = s.getBytes("US-ASCII"); |
byte[] bytes = s.getBytes("US-ASCII"); |
130 |
resp.getOutputStream().write(bytes); |
resp.getOutputStream().write(bytes); |
131 |
} |
} |
|
resp.close(); |
|
132 |
return resp; |
return resp; |
133 |
} catch(FileNotFoundException e) { |
} catch(FileNotFoundException e) { |
134 |
return resf.makeError(404, "Not found"); |
return resf.makeError(404, "Not found"); |
140 |
w.write("The URN in request is invalid.\n"); |
w.write("The URN in request is invalid.\n"); |
141 |
w.write("Requested URI: "+req.getRequestURI()+"\n"); |
w.write("Requested URI: "+req.getRequestURI()+"\n"); |
142 |
w.close(); |
w.close(); |
|
resp.close(); |
|
143 |
return resp; |
return resp; |
144 |
} catch(Exception e) { |
} catch(Exception e) { |
145 |
e.printStackTrace(); |
e.printStackTrace(); |