Can you help me with this sample?
void doPost(HttpServletRequest arg0, httpServletResponse arg1) throws ServletException, IOException {
InputStream in=arg0.getInputStream();
byte[] b=new byte[50];
in.read(b);
for(byte i : b){
System.out.println(i) ;
}
}
I post a parameter such as "for=12345" through a form,but above code can not read byte from stream. I change the code as
InputStreamReader isr = new InputStreamReader (in);
BufferedReader br = new BufferedReader (isr);
System.out.println(br.readLine()) ;
it prints "for=12345"
why??