A
ap
Hi all,
Is anyone one know what is the different between them and which
one is faster or they have the same performance....
#############################################
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
response.setContentType("image/jpeg");
ServletOutputStream out = response.getOutputStream();
BufferedInputStream in = new BufferedInputStream(new
FileInputStream ("c:/images/abc.gif"));
while ((data = in.read()) != -1) {
out.write(data);
}
in.close();
out.close();
}
#############################################
and
#############################################
<img src="../images/abc.gif" /> in a .jsp file
#############################################
both of the file name are generated by some function
Is anyone one know what is the different between them and which
one is faster or they have the same performance....
#############################################
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
response.setContentType("image/jpeg");
ServletOutputStream out = response.getOutputStream();
BufferedInputStream in = new BufferedInputStream(new
FileInputStream ("c:/images/abc.gif"));
while ((data = in.read()) != -1) {
out.write(data);
}
in.close();
out.close();
}
#############################################
and
#############################################
<img src="../images/abc.gif" /> in a .jsp file
#############################################
both of the file name are generated by some function