In page 205 of HFSJ, it mentioned as follows. OutputStream os = response.getOutputStream(); As per specs, getOutputStream() returns ServletOutputStream object. Then how come it is mentioned only as OutputStream?
OutputStream os = response.getOutputStream(); is a legal statement since javax.servlet.ServletOutputStream extends java.io.OutputStream. In the example they use the method os.write() (which comes from OutputStream), so there is no need to use ServletOutputStream. Both are legal, this is just an arbitrary choice I think.
Gabb
SCJP 1.4 (85%)<br />SCWCD 1.4 (94%)
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
a bit of art, as a gift, the permaculture playing cards