• Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarification on the HttpURLConnection Input and output stream

 
bhargav reddy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a simple proxy application which reads the data from HttpURLConnection input stream and writes it back to HttpServletResponse output stream.

I have observed the content length which is set in header is always greater than the data length which is read from the inputstream. [ Data is unicode ]

In all the request which i process i see last 2 or 3 bytes are empty. [note: These empty bytes are not from the source from where i get the input stream ]

I would like to know, what exactly are these last 2 or 3 bytes used for or they have any significant role.

Let me know thoughts on this.

Thanks in Advance,
Bhargav
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!